Advertisement
luckytyphlosion

!luckypls

Nov 3rd, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.72 KB | None | 0 0
  1. import time
  2. import discord
  3. import logging
  4.  
  5. luckymsgs = []
  6. animationmsgs = []
  7. # Set up the logging module to output diagnostic to the console.
  8. logging.basicConfig()
  9.  
  10. client = discord.Client()
  11. client.login('yellow151@memebig.net', 'kappa42069') # username/password
  12.  
  13. if not client.is_logged_in:
  14.     print('Logging in to Discord failed')
  15.     exit(1)
  16.  
  17. @client.event
  18. def on_ready():
  19.     print('Connected!')
  20.     print('Username: ' + client.user.name)
  21.     print('ID: ' + client.user.id)
  22.     print('------')
  23.  
  24. @client.event
  25. def on_message(message):
  26.     #print(message.author)
  27.     #print(message.id)
  28.     #if message.channel.name == "gen-1-glitched":
  29.     saved_message = message
  30.     if (message.content == "!luckypls" or message.content == "!luckyplsperma") and len(luckymsgs) >= 1:
  31.         if saved_message.content == "!luckyplsperma" and saved_message.author.name != "luckytyphlosion":
  32.             Kappa = ""
  33.             for count in range(3):
  34.                 Kappa += "Kappa "
  35.                 client.send_message(saved_message.channel, Kappa)
  36.             for count in range(2):
  37.                 Kappa = Kappa[:-6]
  38.                 client.send_message(saved_message.channel, Kappa)
  39.         else:
  40.             for message in luckymsgs:
  41.                 if message.channel != saved_message.channel:
  42.                     continue
  43.                 else:
  44.                     client.edit_message(message, "<message deleted>")
  45.            
  46.             if saved_message.content == "!luckyplsperma" and saved_message.author.name == "luckytyphlosion":
  47.                 pass
  48.             else:
  49.                 time.sleep(6.9)
  50.                 for message in luckymsgs:
  51.                     if message.channel != saved_message.channel:
  52.                         continue
  53.                     else:
  54.                         client.edit_message(message, message.content)
  55.    
  56.     message = saved_message
  57.     if message.author.name == "luckytyphlosion":
  58.         if len(luckymsgs) >= 10:
  59.             temp_message = luckymsgs.pop(0)
  60.             #print("Popped message " + temp_message.content)
  61.        
  62.         luckymsgs.append(message)
  63.         #print("Appended message " + message.content)
  64.  
  65.     if message.content == "test":
  66.         client.send_message(message.channel, "icicles")
  67.        
  68.     if message.channel.name == "goldenrodnostalgia":
  69.         if message.content == "!yolocoin":
  70.             client.send_message(message.channel, "Congratulations on the new RIP!")
  71.    
  72.     if message.content == "!animation":
  73.         luckypls = "!luckypls"
  74.         tempstring = " _ _ "
  75.         anim_msg = client.send_message(message.channel, luckypls)
  76.         for count in range(10):
  77.             luckypls = tempstring + luckypls + tempstring
  78.             anim_msg = client.edit_message(anim_msg, luckypls)
  79.            
  80.         for count in range(10):
  81.             luckypls = luckypls[5:-5]
  82.             anim_msg = client.edit_message(anim_msg, luckypls)
  83.        
  84.     elif message.content.startswith("!scrolltext "):
  85.         scrollmsg = message.content[12:]
  86.         sentmsg = client.send_message(message.channel, "_ _")
  87.         deltamsg = ""
  88.         for char in scrollmsg:
  89.             deltamsg += char
  90.             anim_msg = client.edit_message(sentmsg, deltamsg)
  91.        
  92. client.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement