Advertisement
pedroricardo

tutorial_python_discord 2

Jul 12th, 2018
7,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import discord
  2. import asyncio
  3. import random
  4.  
  5. client = discord.Client()
  6.  
  7. @client.event
  8. async def on_ready():
  9. print('BOT ONLINE - OLÁ MUNDO')
  10. print(client.user.name)
  11. print(client.user.id)
  12. print('-----PR------')
  13.  
  14.  
  15. @client.event
  16. async def on_message(message):
  17. if message.content.lower().startswith('?test'):
  18. await client.send_message(message.channel, "Olá Mundo, estou vivo!")
  19.  
  20.  
  21. client.run('TOKEN')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement