mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-03 18:42:43 +00:00
Fix a KeyError for channels with no category in Guild.by_category
This commit is contained in:
parent
c01bf7cd56
commit
f94b00cb48
@ -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…
x
Reference in New Issue
Block a user