Advertisement
Guest User

Lottery Discord Bot

a guest
Oct 22nd, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. token = ''
  2. guild = 'Test'
  3. lottery = ['4753672', '3963852', '3092670', '9346897', '1234567', ]
  4. x = random.choice(lottery)
  5.  
  6. client = discord.Client()
  7.  
  8. @client.event
  9. async def on_ready():
  10.  
  11.  
  12.  
  13.     print(f'{client.user} has connected to Discord!')
  14.  
  15. @client.event
  16. async def on_message(message):
  17.     if message.author == client.user:
  18.         return
  19.  
  20.  
  21.     if message.content == '$lottery':
  22.         response = (x)
  23.         lottery.remove(x)
  24.  
  25.         await message.channel.send(response)
  26.  
  27.  
  28. client.run(token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement