forked from sh-edraft.de/sh_discord_bot
Changed logic to get member for reaction #65
This commit is contained in:
parent
6865953433
commit
523eb23f09
@ -34,7 +34,11 @@ class ReactionHandler:
|
|||||||
return
|
return
|
||||||
|
|
||||||
guild = self._bot.get_guild(payload.guild_id)
|
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:
|
if user.bot:
|
||||||
self._logger.debug(__name__, f'User is bot - skipping')
|
self._logger.debug(__name__, f'User is bot - skipping')
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user