Browse Source

Fix a KeyError for channels with no category in Guild.by_category

pull/5069/head
Rapptz 5 years ago
parent
commit
f94b00cb48
  1. 5
      discord/guild.py

5
discord/guild.py

@ -412,7 +412,10 @@ class Guild(Hashable):
grouped[channel.id] = []
continue
grouped[channel.category_id].append(channel)
try:
grouped[channel.category_id].append(channel)
except KeyError:
grouped[channel.category_id] = [channel]
def key(t):
k, v = t

Loading…
Cancel
Save