Fixing message grab

Getting the channel the reaction was handled in and changing the `fetch_message` call to grab from the channel
This commit is contained in:
Grey Himmel 2019-04-22 19:37:10 -04:00 committed by GitHub
parent 6a27b5b54d
commit 97dae86b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,7 +249,8 @@ async def do_query_message(conn, client: discord.Client, payload: discord.RawRea
# Send the card to the user
try:
await user.send(embed=card)
message = await client.fetch_message(payload.message_id)
channel = await client.fetch_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
if message.guild and message.channel.permissions_for(message.guild.get_member(client.user.id)).manage_messages:
await message.remove_reaction(payload.emoji, user)
except discord.Forbidden: