From 17dfeb0f117ff60a65c3c0f5619a1cd9fb2ef187 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Fri, 9 Nov 2018 03:09:55 -0300 Subject: [PATCH] pubsub.lazy_guild: bugfixes --- litecord/pubsub/lazy_guild.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/litecord/pubsub/lazy_guild.py b/litecord/pubsub/lazy_guild.py index ec8b06d..9925d3d 100644 --- a/litecord/pubsub/lazy_guild.py +++ b/litecord/pubsub/lazy_guild.py @@ -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):