add reactions tool

This commit is contained in:
Jan Speckamp 2022-04-04 15:08:35 +02:00
parent 82fdec04ff
commit 4a100cf58a
1 changed files with 33 additions and 0 deletions

33
reactions/main.py Normal file
View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
import discord
TOKEN = "<DISCORD TOKEN>"
target_name = "JohnDoe"
target_disc = "1234"
guild_id = 1234
channel_id = 1234
emojinames = ["wasd1", "wasd2"]
client = discord.Client()
emojis = []
@client.event
async def on_ready():
for tup in client.get_guild(guild_id).emojis:
if tup.name in emojinames:
emojis.append(tup)
@client.event
async def on_message(message):
channelIDsToListen = [channel_id]
if message.channel.id in channelIDsToListen:
if message.author.name == target_name and message.author.discriminator == target_disc:
for em in emojis:
await message.add_reaction(em)
print("Started")
client.run(TOKEN, bot=False)