pubsub.lazy_guild: bugfixes

This commit is contained in:
Luna Mendes 2018-11-09 03:09:55 -03:00
parent e0011d7a38
commit 17dfeb0f11
1 changed files with 6 additions and 3 deletions

View File

@ -799,7 +799,7 @@ class GuildMemberList:
return
group = self.list.groups[group_idx]
group.permissions = role['permissions']
group.permissions = Permissions(role['permissions'])
await self._fetch_overwrites()
@ -943,11 +943,14 @@ class LazyGuildDispatcher(Dispatcher):
log.warning('unknown event: {}', event)
return
async def _call_all_lists(self, guild_id, method: str, *args):
async def _call_all_lists(self, guild_id, method_str: str, *args):
lists = self.get_gml_guild(guild_id)
log.debug('calling method={} to all {} lists',
method, len(lists))
for lazy_list in lists:
method = getattr(lazy_list, method)
method = getattr(lazy_list, method_str)
await method(*args)
async def _handle_new_role(self, guild_id: int, new_role: dict):