add reactions tool
This commit is contained in:
parent
82fdec04ff
commit
4a100cf58a
|
@ -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)
|
Loading…
Reference in New Issue