Fix exception for invalid channel types
This commit is contained in:
parent
da6119e04c
commit
930c416ea7
@ -1324,7 +1324,7 @@ class Guild(Hashable):
|
|||||||
def convert(d):
|
def convert(d):
|
||||||
factory, ch_type = _channel_factory(d['type'])
|
factory, ch_type = _channel_factory(d['type'])
|
||||||
if factory is None:
|
if factory is None:
|
||||||
raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data))
|
raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(d))
|
||||||
|
|
||||||
channel = factory(guild=self, state=self._state, data=d)
|
channel = factory(guild=self, state=self._state, data=d)
|
||||||
return channel
|
return channel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user