add X react to our messages as a cue for users who don't know how to delete it

main
xenofem 2022-03-18 02:19:16 -04:00
parent 482d26cbd4
commit 12051f99a7
1 changed files with 5 additions and 1 deletions

6
bot.py
View File

@ -51,7 +51,11 @@ async def on_message(message):
print('error reading attachments: {0}'.format(e), file=sys.stderr) print('error reading attachments: {0}'.format(e), file=sys.stderr)
return return
try: try:
await message.channel.send("{0} says: {1}".format(message.author.mention, message.content), files=attachments) spoilered_message = await message.channel.send("{0} says: {1}".format(message.author.mention, message.content), files=attachments)
try:
await spoilered_message.add_reaction('')
except discord.DiscordException as e:
print('error reacting to message: {0}'.format(e))
except discord.DiscordException as e: except discord.DiscordException as e:
print('error sending message: {0}'.format(e), file=sys.stderr) print('error sending message: {0}'.format(e), file=sys.stderr)
return return