mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 04:17:16 +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] = []
|
grouped[channel.id] = []
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
grouped[channel.category_id].append(channel)
|
grouped[channel.category_id].append(channel)
|
||||||
|
except KeyError:
|
||||||
|
grouped[channel.category_id] = [channel]
|
||||||
|
|
||||||
def key(t):
|
def key(t):
|
||||||
k, v = t
|
k, v = t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user