Advertisement
Guest User

Discord.py

a guest
Jul 23rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.88 KB | None | 0 0
  1. @client.command
  2. async def on_message(message):
  3.     channel = message.channel
  4.     if message.content.upper().startswith('AGREE'):
  5.         chan == discord.utils.get(author.server, name=‘agree’
  6.         if message.channel == chan:
  7.             auth = message.author
  8.             role = discord.utils.get(auth.server.roles, name='Member')
  9.             await bot.add_roles(auth, role)
  10.             embed = discord.Embed(
  11.                 colour = discord.Colour.dark_grey()
  12.             )
  13.             embed.set_author(name='LOGS')
  14.             embed.add_field(name='Member Joined', value='Member used `agree` in #start-here.', inline=True)
  15.             chan = discord.utils.get(auth.server.roles, name=‘joins’)
  16.             await bot.send_message(chan, embed=embed)
  17.             await bot.delete_message(message)
  18.         else:
  19.             return
  20.     await bot.process_commands(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement