SHARE
TWEET

Untitled

a guest Feb 4th, 2016 1,108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import discord
  2. import os
  3. email=""
  4. password=""
  5. channel="general"
  6.  
  7. client = discord.Client()
  8. client.login(email,password)
  9. if not client.is_logged_in:
  10.     print("Logging in to Discord failed")
  11.     exit(1)
  12. @client.event
  13. def on_message(message):
  14.     if message.content.startswith('!eval'):
  15.         if message.author == client.user:
  16.             print(message.content)
  17.  
  18.             #client.delete_message(message)
  19.             content = message.content.lstrip("!eval ")
  20.             output = (eval(content))
  21.             print(output)
  22.             client.send_message(message.channel, output)
  23.  
  24.  
  25. @client.event
  26. def on_ready():
  27.     print("Logged in as")
  28.     print(client.user.name)
  29.     print(client.user.id)
  30.     print("-------")
  31.  
  32. client.run()
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