mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-11-21 00:01:32 +00:00
Optimise utils.find and specialise utils.as_chunks
This commit is contained in:
@@ -821,7 +821,7 @@ class GuildChannel:
|
||||
if obj.is_default():
|
||||
return base
|
||||
|
||||
overwrite = utils.get(self._overwrites, type=_Overwrites.ROLE, id=obj.id)
|
||||
overwrite = utils.find(lambda ow: ow.type == _Overwrites.ROLE and ow.id == obj.id, self._overwrites)
|
||||
if overwrite is not None:
|
||||
base.handle_overwrite(overwrite.allow, overwrite.deny)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user