aboutsummaryrefslogtreecommitdiff
path: root/discord/guild.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-09-08 21:28:45 -0400
committerRapptz <[email protected]>2017-09-08 21:30:25 -0400
commit1367877d36872ae98e8375d6a9b76ab7dc1c991e (patch)
treea5e52a4945f606dd3f20cdf568ef979667b714b0 /discord/guild.py
parentFix docstrings for Webhook.send (diff)
downloaddiscord.py-1367877d36872ae98e8375d6a9b76ab7dc1c991e.tar.xz
discord.py-1367877d36872ae98e8375d6a9b76ab7dc1c991e.zip
Fix crashing for now when a category is created.
A full implementation will come later.
Diffstat (limited to 'discord/guild.py')
-rw-r--r--discord/guild.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 5d7cb134..ed2860bd 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -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):