Advertisement
Velinquish

Untitled

May 25th, 2020
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. tracked_channels = []
  2.  
  3. @client.command()
  4. async def track(ctx, channels: commands.Greedy[discord.TextChannel] = None):
  5.   global tracked_channels
  6.   tracked_channels = channels
  7.  
  8. @client.event
  9. async def on_message(message):
  10.   await client.process_commands(message)
  11.   if message.channel in tracked_channels:
  12.     await message.add_reaction('\U0001f983')
  13.  
  14. @client.event
  15. async def on_reaction_add(reaction, user):
  16.   if reaction.message.channel in tracked_channels and reaction.emoji == '\U0001f983' and user != client.user:
  17.     await reaction.remove(user)
  18.     await user.create_dm()
  19.     await user.dm_channel.send(embed=discord.Embed(title="HAPPY ONE DAY BIRTHDAY, JACOB!! :partying_face:", colour=0xE94545, description=f"Happy birthday to you.\nHappy birthday to you.\nHappy birthday dear Jacob.\nHappy birthday to you.\n:turkey:"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement