daily pastebin goal
39%
SHARE
TWEET

tutorial_python_discord 2

pedroricardo Jul 12th, 2018 1,571 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top