From 1367877d36872ae98e8375d6a9b76ab7dc1c991e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 8 Sep 2017 21:28:45 -0400 Subject: Fix crashing for now when a category is created. A full implementation will come later. --- discord/guild.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'discord/guild.py') 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): -- cgit v1.2.3