Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import discord
  2.  
  3. class MyClient(discord.Client):
  4. async def on_ready(self):
  5. print('Logged on as', self.user)
  6.  
  7. async def on_message(self, message):
  8. # don't respond to ourselves
  9. if message.author == self.user:
  10. return
  11.  
  12. if message.content == 'ping':
  13. await message.channel.send('pong')
  14.  
  15. client = MyClient()
  16. client.run('token')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement