mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 00:55:19 +00:00
Fix a KeyError for channels with no category in Guild.by_category
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user