Fix crashing for now when a category is created.

A full implementation will come later.
This commit is contained in:
Rapptz
2017-09-08 21:28:45 -04:00
parent 8912625428
commit 1367877d36
2 changed files with 7 additions and 2 deletions

View File

@ -249,10 +249,11 @@ class Guild(Hashable):
for c in channels:
if c['type'] == ChannelType.text.value:
channel = TextChannel(guild=self, data=c, state=self._state)
else:
self._add_channel(channel)
elif c['type'] == ChannelType.voice.value:
channel = VoiceChannel(guild=self, data=c, state=self._state)
self._add_channel(channel)
self._add_channel(channel)
@property
def channels(self):