From 523eb23f09b28544a1f8e01d1b9291464d105a68 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 6 Oct 2022 16:51:57 +0200 Subject: [PATCH] Changed logic to get member for reaction #65 --- src/modules/auto_role/helper/reaction_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/auto_role/helper/reaction_handler.py b/src/modules/auto_role/helper/reaction_handler.py index 4be2049353..56c8df8715 100644 --- a/src/modules/auto_role/helper/reaction_handler.py +++ b/src/modules/auto_role/helper/reaction_handler.py @@ -34,7 +34,11 @@ class ReactionHandler: return guild = self._bot.get_guild(payload.guild_id) - user = await guild.fetch_member(payload.user_id) + user = guild.get_member(payload.user_id) + if user is None: + self._logger.warn(__name__, f'User {payload.user_id} in {guild.name} not found - skipping') + return + if user.bot: self._logger.debug(__name__, f'User is bot - skipping') return