mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-28 02:50:20 +12:00
fix for reactions runnning in dms
This commit is contained in:
parent
44cb3e6812
commit
a38181ab96
|
@ -130,6 +130,8 @@ class ReactPoll(commands.Cog):
|
|||
async def on_raw_reaction_add(self, payload):
|
||||
# parse payload
|
||||
guild = self.bot.get_guild(payload.guild_id)
|
||||
if not guild:
|
||||
return
|
||||
user = guild.get_member(payload.user_id)
|
||||
message = await self.bot.get_channel(payload.channel_id).fetch_message(payload.message_id)
|
||||
# Listener is required to remove bad reactions
|
||||
|
|
Loading…
Reference in a new issue