Compare commits
1 commit
128af6b3c0
...
2d08476c11
Author | SHA1 | Date | |
---|---|---|---|
xenofem | 2d08476c11 |
|
@ -46,7 +46,17 @@ async def on_message(message):
|
||||||
print('error deleting message: {0}'.format(e))
|
print('error deleting message: {0}'.format(e))
|
||||||
return
|
return
|
||||||
elif mentions_me(message):
|
elif mentions_me(message):
|
||||||
await message.channel.send("upload an image and put 'spoil' anywhere in the description, and I'll spoiler it for you")
|
await message.channel.send("upload an image and put 'spoil' anywhere in the description, and I'll spoiler it for you. to delete your post, add a :x: react to it.")
|
||||||
|
|
||||||
|
@client.event
|
||||||
|
async def on_reaction_add(reaction, user):
|
||||||
|
if reaction.message.author == client.user
|
||||||
|
and str(reaction.emoji) == '❌'
|
||||||
|
and reaction.message.content.startswith('{0} says: '.format(user.mention)):
|
||||||
|
try:
|
||||||
|
await reaction.message.delete()
|
||||||
|
except discord.DiscordException as e:
|
||||||
|
print('error deleting my own message: {0}'.format(e))
|
||||||
|
|
||||||
with open('token') as f:
|
with open('token') as f:
|
||||||
token = f.read().strip()
|
token = f.read().strip()
|
||||||
|
|
Loading…
Reference in a new issue