Finally added comments

dev
pocketjawa 2017-02-26 21:31:15 -05:00
parent 0ee06ba2db
commit 06e200aac3
1 changed files with 20 additions and 0 deletions

View File

@ -36,35 +36,55 @@ def on_ready():
@client.event @client.event
@asyncio.coroutine @asyncio.coroutine
def on_message(message): def on_message(message):
#Maki Monday praise command
if (message.content.lower().startswith('!maki')) or (message.content.lower().startswith('!monday')): if (message.content.lower().startswith('!maki')) or (message.content.lower().startswith('!monday')):
yield from client.send_message(message.channel, 'http://maki.pocketjawa.com/monday.png') yield from client.send_message(message.channel, 'http://maki.pocketjawa.com/monday.png')
#Posts help info
elif message.content.lower().startswith('!help'): elif message.content.lower().startswith('!help'):
helpfile = open("/srv/discord-pocketbot/helpcommand.txt","r") helpfile = open("/srv/discord-pocketbot/helpcommand.txt","r")
yield from client.send_message(message.channel, helpfile.read()) yield from client.send_message(message.channel, helpfile.read())
#Sleeps for 5 seconds. Don't know why I still have this tbh
elif message.content.lower().startswith('!sleep'): elif message.content.lower().startswith('!sleep'):
yield from asyncio.sleep(5) yield from asyncio.sleep(5)
yield from client.send_message(message.channel, 'Done sleeping') yield from client.send_message(message.channel, 'Done sleeping')
#Posts link to my mix archive
elif message.content.lower().startswith('!mixes'): elif message.content.lower().startswith('!mixes'):
yield from client.send_message(message.channel, 'You can download mp3s of any of my mixes at http://maki.pocketjawa.com/mixes/') yield from client.send_message(message.channel, 'You can download mp3s of any of my mixes at http://maki.pocketjawa.com/mixes/')
#Pokes the person who said the command
elif message.content.lower().startswith('!pokeme'): elif message.content.lower().startswith('!pokeme'):
yield from client.send_message(message.channel, "_pokes <@"+message.author.id+">_") yield from client.send_message(message.channel, "_pokes <@"+message.author.id+">_")
#Dump the navy seal copypasta
elif message.content.lower().startswith('!wtf'): elif message.content.lower().startswith('!wtf'):
yield from client.send_typing(message.channel) yield from client.send_typing(message.channel)
yield from asyncio.sleep(3) yield from asyncio.sleep(3)
yield from client.send_message(message.channel, 'What the fuck did you just fucking say about me, you little bitch? Ill have you know I graduated top of my class in the Navy Seals, and Ive been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and Im the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. Youre fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and thats just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldnt, you didnt, and now youre paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. Youre fucking dead, kiddo.') yield from client.send_message(message.channel, 'What the fuck did you just fucking say about me, you little bitch? Ill have you know I graduated top of my class in the Navy Seals, and Ive been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and Im the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. Youre fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and thats just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldnt, you didnt, and now youre paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. Youre fucking dead, kiddo.')
#Countdown until the Switch comes out!
elif message.content.lower().startswith('!switch'): elif message.content.lower().startswith('!switch'):
now = datetime.datetime.now() now = datetime.datetime.now()
switchdate = datetime.datetime(2017, 3, 3) switchdate = datetime.datetime(2017, 3, 3)
switchdelta = switchdate - now switchdelta = switchdate - now
switchmsg = "<:switchl:283809380137435139>Only **%s** until the Switch comes out!<:switchr:283809391835349004>" % (switchdelta) switchmsg = "<:switchl:283809380137435139>Only **%s** until the Switch comes out!<:switchr:283809391835349004>" % (switchdelta)
yield from client.send_message(message.channel, switchmsg) yield from client.send_message(message.channel, switchmsg)
#Posts status of the UPS
elif message.content.lower().startswith('!ups'): elif message.content.lower().startswith('!ups'):
ups_status = open("/tmp/ups_status.txt","r") ups_status = open("/tmp/ups_status.txt","r")
yield from client.send_message(message.channel, ups_status.read()) yield from client.send_message(message.channel, ups_status.read())
#Posts random picture of Tohru
elif message.content.lower().startswith('!tohru'): elif message.content.lower().startswith('!tohru'):
tohru_list_file = open("/srv/discord-pocketbot/lists/tohru_images.txt", "r") tohru_list_file = open("/srv/discord-pocketbot/lists/tohru_images.txt", "r")
tohru_pics = tohru_list_file.read().split() tohru_pics = tohru_list_file.read().split()
yield from client.send_message(message.channel, random.choice(tohru_pics)) yield from client.send_message(message.channel, random.choice(tohru_pics))
#Sets the bot's Now Playing status
elif message.content.lower().startswith('!setplaying'): elif message.content.lower().startswith('!setplaying'):
yield from client.change_presence(game=discord.Game(name=message.content.partition(' ')[2])) yield from client.change_presence(game=discord.Game(name=message.content.partition(' ')[2]))