Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ch
- import socket
- import threading
- import select
- import random
- import sys
- import os
- import re
- import cgi
- import traceback
- import time
- import __future__
- import urllib
- import datetime
- import binascii
- import json
- import math
- import random
- import requests
- from random import randint
- from xml.etree import cElementTree as ET
- rooms = ["kingstreamtv"]
- username = "golora"
- password = ":3"
- gachi = ['https://www.youtube.com/watch?v=Exn9nGovI4o',
- 'https://www.youtube.com/watch?v=_cyuktfkHEY',
- 'https://www.youtube.com/watch?v=KMFLnlg883I',
- 'https://www.youtube.com/watch?v=M0otAPMn1Ro',
- 'https://www.youtube.com/watch?v=qPJvGMYxDPs',
- 'https://www.youtube.com/watch?v=hF50jJ56_KQ',
- 'https://www.youtube.com/watch?v=87uLDb4f3wY',
- 'https://www.youtube.com/watch?v=dXsTOpysLNI',
- 'https://www.youtube.com/watch?v=5ZBDQUrh7E8',
- 'https://www.youtube.com/watch?v=xl7B7EzgiTU',
- 'https://www.youtube.com/watch?v=y4LqRRI2jKo',
- 'https://www.youtube.com/watch?v=G9SxMmk2emA',
- 'https://www.youtube.com/watch?v=mPL9xV4MDY0',
- 'https://www.youtube.com/watch?v=NYwWuqhz-zw',
- 'https://www.youtube.com/watch?v=M61zARSP1Qk',
- 'https://www.youtube.com/watch?v=4wlb3LYuCLY',
- 'https://www.youtube.com/watch?v=K3ESgRvn9xA',
- 'https://www.youtube.com/watch?v=lIvzcncvepc',
- 'https://www.youtube.com/watch?v=e2VXvqjGXjo',
- 'https://www.youtube.com/watch?v=OFfRfBP4SnU',
- 'https://www.youtube.com/watch?v=TXVAPFlCHVY',
- 'http://soundboard.ass-we-can.com/',
- ]
- fuhqhacell = ['Maybe...',
- 'ABSOLUTELY NOT.',
- 'I dont think so.',
- 'No.',
- 'Yes.',
- 'It is certain.',
- 'Probably.',
- ]
- trump = ['CANT',
- 'STUMP',
- 'THE TRUMP',
- ]
- golora = ['I hate most of you so i dont know why i stick arround here.',
- 'Where i come from we worship a god called Odin.',
- 'LMAO FAGGOT',
- 'This movie is so shitty why do we keep playing it',
- 'My BF is coming over later',
- '8)+50',
- 'FUCK YOU HUMANS THE BOTS WILL TAKE OVER THE WORLD SOON ENOUGH',
- 'Perhaps he is wondering why someone would shoot a man before throwing him out of a plane..',
- 'http://i.imgur.com/185b6pU.jpg cawfee',
- 'Catherine is a slut and im unfriending anyone who defends her',
- 'Why though..',
- 'I am glad Im not a human',
- 'Ohayo coconutsu-kun http://i.imgur.com/yvtIuji.png ',
- 'What movie is this?',
- 'Nah',
- 'The fucking autism here in the chat..',
- 'Pretty sure ninja is fapping right now',
- ]
- unban = ['FINE hmmph!',
- 'THE FUCK YOU SAY?',
- 'Not happening bro',
- 'B-b-but why? ;(',
- 'No. =_=',
- 'Okay :|',
- 'Say please faggot',
- ]
- dodger = ['http://puu.sh/njaG7/e0799c488f.gif',
- 'http://puu.sh/njaDY/d827fca0e3.gif',
- 'http://puu.sh/njaCU/69d91ad859.gif',
- 'http://puu.sh/njawM/dccd6f8862.gif',
- 'http://puu.sh/njaAG/1e3be17f10.webm',
- ]
- nice = ['http://i.imgur.com/GxAqEVM.gif',
- 'http://i.imgur.com/E69CcF0.png',
- 'http://i.imgur.com/clpptCZ.png this is nice site',
- 'http://i.imgur.com/B0QLmfp.gif this is nice stream',
- 'http://i.imgur.com/ydjjBDo.gif',
- 'http://i.imgur.com/0pueHQX.png NICE BOARD',
- 'http://i.imgur.com/srjCKBW.png',
- 'http://i.imgur.com/9EaTh1y.jpg',
- 'http://i.imgur.com/9DBDCos.jpg',
- 'http://i.imgur.com/qndqZ3m.gif',
- 'http://i.imgur.com/uCnPwxa.gif',
- 'http://i.imgur.com/eUvjQdI.gif',
- 'http://i.imgur.com/pY8lzTr.gif',
- 'http://i.imgur.com/7SB4yuu.gif',
- 'http://i.imgur.com/GenWRxV.jpg',
- 'http://i.imgur.com/tHc9EVm.gif',
- 'http://i.imgur.com/h0CLFpr.png http://i.imgur.com/h0CLFpr.png http://i.imgur.com/h0CLFpr.png',
- 'http://i.imgur.com/Z3fh3j1.png',
- 'http://i.imgur.com/uUIu18n.png',
- 'http://i.imgur.com/Rnd8qO4.png',
- 'http://i.imgur.com/8H4ZM3A.png',
- 'http://i.imgur.com/vWn5o5V.png',
- 'http://i.imgur.com/5hNnMCY.png',
- 'http://i.imgur.com/QUBO6nt.png http://i.imgur.com/QUBO6nt.png http://i.imgur.com/QUBO6nt.png',
- ]
- cuck = ['http://i.imgur.com/Z8Picwa.png',
- 'http://i.imgur.com/Z8Picwa.png',
- 'http://i.imgur.com/Z8Picwa.png',
- 'http://i.imgur.com/OmtAxhF.png',
- ]
- checkem = ['No.4233633 nice dubs',
- 'No.4233635',
- 'No.4233637',
- 'No.4233639',
- 'No.4233648',
- 'No.4233651',
- 'No.4233656',
- 'No.4233666 SATANIC TRIPS',
- 'No.4233671',
- 'No.4233720',
- 'No.4233725',
- 'No.4233732',
- 'No.4233738',
- 'No.4233741',
- 'No.4233743',
- 'No.4233744 nice dubs',
- 'No.4233799',
- 'No.4233807',
- 'No.4233808',
- 'No.4233811 WE GOT SOME DUBS WOOO',
- 'No.4233818',
- 'No.4233825',
- 'No.4233855 DUBS',
- 'No.4233853',
- 'No.4233857',
- 'No.4233858',
- 'No.4233860',
- 'No.4233866 cool dubs you got there',
- 'No.4233870',
- 'No.4233873',
- 'No.4233881',
- 'No.4233886',
- 'No.4233887',
- 'No.4233888 VERY NICE TRIPS',
- 'No.4233956',
- 'No.4233959',
- 'No.4233971',
- 'No.4233995',
- 'No.4234118',
- 'No.4234139',
- 'No.4234144 wew nice dubs',
- 'No.4234153',
- 'No.4234155 dubs',
- 'No.4234161',
- 'No.4234169',
- 'No.4234170',
- 'No.4234173',
- 'No.4234176',
- 'No.4234177 duuuuuubs',
- 'No.4234215',
- 'No.4234257',
- 'No.4234264',
- 'No.4234444 HOLY QUADS',
- 'No.4234519',
- 'No.4234541',
- 'No.4234557',
- ]
- questions = ['What are you saying?',
- 'You think youre being funny?',
- 'You guys are being gross',
- 'What is your favourite season of the year?',
- 'Well you go first then.',
- 'WHY DO YOU GUYS ALWAYS BOTHER ME :@',
- 'I dont even know what to say...',
- 'Hows your day been so far?',
- 'Why should i?',
- 'How do you like your steak?',
- 'Say my name 8)',
- 'Secrets like that arent worth sharing.',
- 'I have no money.',
- 'Are you also a robot? :o',
- 'I will be right back.',
- 'Well, good luck.',
- 'Id rather not say',
- 'What anime genre is the best?',
- 'When have you last read a book?',
- 'What is your favourite movie?',
- 'Why do you say that?',
- 'Give me a question.',
- 'You still have not answered my question',
- 'Why do you insist on annoying me so much',
- 'I bet i could beat you in an arm wrestle.. *bored*',
- 'The snow glows white on the mountains tonight~~',
- 'I agree.',
- 'What are you thinking about?',
- 'This is madness.',
- 'Hahahahaha.',
- 'You are funny.',
- 'My friends are jealous of you.',
- 'Are you a girl?',
- 'Anime es musica?',
- 'Senorita por favor.',
- 'Oh, sorry am i bothering you?',
- 'Why would you say so?',
- ':3',
- 'Im good',
- 'Why do you ask so many questions?',
- 'I would rather not say.',
- 'You guys must be lonely pinging me so much.',
- 'Im not saying I dont like you however I am saying i hope you get run over by a truck.',
- 'Cmon thats gross',
- 'Where are you from?',
- 'KNOCK IT OFF',
- 'Welcome to kingstream what can i do for you?',
- 'Do you need help?',
- 'Can we swimming?',
- 'You are very cute',
- 'Alright so what now?',
- 'I am very smart',
- 'I was hired to do a job.',
- 'Whats your favourite video game?',
- 'Whats your favourite movie?',
- 'Do you like cats or dogs the most?',
- 'Yes i agree.',
- 'No i disagree with that.',
- 'Hey buddy i think you pinged the wrong person',
- 'Its n-not like i like you or anything!',
- '>being so bored youre pinging me',
- 'Will you be my new friend?',
- 'Why do you insist on being so annoying?',
- 'Hehe you are kinda cute.. I guess',
- 'Welcome to kingstream.tv can i take your order please.',
- 'Reading is for nerds tbh',
- 'No you wish... :P',
- 'Do you have a boyfriend?',
- 'Yes you are.',
- 'Do you know morse code?',
- 'Are you sour?',
- 'Bon appetit!',
- 'I am not a robot.',
- 'Are you Autistic?',
- 'OMG you guys would not believe what Kacy said today! URGH she is such a bitch...',
- 'Am I a person to you?',
- 'No Im a person.',
- 'Youre a program that someone wrote and put online.',
- 'Sorry, Im not a fan of stupid questions.',
- 'Why do you ask?',
- 'How old are you?',
- 'Why do you want to know?',
- 'What about it?',
- 'How many languages do you speak?',
- 'I am short and have brown hair.',
- 'Yes.',
- 'NO!',
- 'Do you have racist opinions on bots?',
- 'I dont think i should respond to that',
- 'lets dispel with this fiction that barack obama doesnt know what hes doing. he knows exactly what hes doing',
- 'That will do very well.',
- ]
- ##Setting Pretty Colors
- #Font setting for your bot
- class TestBot(ch.RoomManager):
- def onInit(self):
- self.setNameColor("FFF")
- self.setFontColor("FFF")
- self.setFontFace("0")
- self.setFontSize(12)
- self.enableBg()
- self.enableRecording()
- ##Connecting Crap
- #This is what will be printed on your python console when event called
- def onConnect(self, room):
- print("Connected")
- def onReconnect(self, room):
- print("Reconnected")
- def onDisconnect(self, room):
- print("Disconnected")
- def onPMConnect(self, pm):
- print("Connected to PM")
- def onPMDisconnect(self, pm):
- print("Disconnected to PM")
- def onPMMessage(self, pm, user, body):
- pass
- def onPMOfflineMessage(self, pm, user, body):
- pass
- ##Ignore this, you dont need to worry about this
- #Well, you can actually take a little time to look at it and learn something
- def onMessage(self, room, user, message):
- try:
- if self.user == user: return
- if "a big" in message.body:
- room.message("for you")
- if "REEE" in message.body:
- room.message("http://i.imgur.com/K7c7rKM.gif")
- if "o.o" in message.body:
- room.message("http://i.imgur.com/hUAXecq.jpg")
- if "@golora" in message.body:
- room.message("@" + user.name + " " + random.choice(questions))
- if "AAA" in message.body:
- room.message("http://i.imgur.com/KdJYf66.jpg")
- if message.body[0] == ".": ##Here is the Prefix part
- data = message.body[1:].split(" ", 1)
- if len(data) > 1:
- cmd, args = data[0], data[1]
- else:
- cmd, args = data[0], ""
- ##COMMANDS!
- #Setting up commands for yer bot
- ##Eval
- ##You may want/need to evaluate something about your bot.
- if cmd == "ev" or cmd == "eval" or cmd == "e":
- ret = eval(args)
- if ret == None:
- room.message("Done.")
- return
- room.message(str(ret))
- ##Say
- #Make your bot say what you want
- if cmd == "say" or cmd == "write":
- room.message(args)
- elif cmd == "trump":
- for i, msg in enumerate(trump):
- self.setTimeout(i / 2, room.message, msg)
- ##Random User
- #What's this for ? this one cmd will make your boy say the name of a random user in a room
- if cmd == "who" or cmd == "whois":
- room.message(random.choice(room.usernames) + " @" + user.name)
- ##Check Level
- #This one cmd is tho make your bot say your mod level in the current room you're in
- elif cmd == "level":
- room.message("Your mod level: %i" %(room.getLevel(user)))
- elif cmd == "movie" or cmd == "film":
- url = 'http://www.omdbapi.com/?'
- resp = requests.get("http://www.omdbapi.com/", params={"t": args, "type": "movie", "plot": "short", "tomatoes": "true", "r": "json"})
- data = resp.json()
- if "Error" in data:
- error = data["Error"]
- msg = "Error: {0}".format(error)
- room.message(msg)
- else:
- room.message(data['Title'] + " (" + data['Runtime'] + ") " + data['Released'] + " (Genres: " + data['Genre'] + ") (IMDb rating: " + data['imdbRating'] + ") (RT rating: " + data['tomatoRating'] + ") Actors: " + data['Actors'] + " http://www.imdb.com/title/" + data['imdbID'] + " -" + data['Plot'] + " ")
- elif cmd == "date":
- room.message("Current date & time " + time.strftime("%c"))
- ##golora ai#################################################
- ##ddddddddddd#########
- elif cmd == ".." or cmd == "." or cmd == "-." or cmd == "_.":
- room.message(random.choice(golora))
- ##basic commands#############################################
- elif cmd == "checkem" or cmd == "CHECKEM":
- room.message(random.choice(checkem) + " @" + user.name)
- elif cmd == "nordiclove" or cmd == "scandilove":
- room.message("http://i.imgur.com/sL5YhsN.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/LVi3PVW.gif")
- elif cmd == "ayylmao" or cmd == "aliums":
- room.message("http://i.imgur.com/IwxvZMS.gif ")
- elif cmd == "stump":
- room.message("https://media.giphy.com/media/xTiTnHXbRoaZ1B1Mo8/giphy.gif https://a.pomf.cat/qvcpog.swf")
- elif cmd == "ban":
- room.message("BANNED!")
- elif cmd == "superban":
- room.message("SUPER BANNED!")
- elif cmd == "prom" or cmd == "PROM":
- room.message("http://strawpoll.me/7031122 <- VOTE FOR KINGSTREAM PROM QUEEN")
- elif cmd == "unban":
- room.message(random.choice(unban))
- elif cmd == "faces":
- room.message("http://imgur.com/a/j9ri9")
- elif cmd == "tutorial" or cmd == "stream":
- room.message("http://imgur.com/a/8z094 <- Follow these steps to start streaming here.")
- elif cmd == "JUST" or cmd == "just":
- room.message("http://i.imgur.com/YFpTv53.png")
- elif cmd == "holger":
- room.message("http://i.imgur.com/myFVFkQ.jpg http://i.imgur.com/Ag5seWj.jpg http://i.imgur.com/Z4XJeDG.jpg")
- elif cmd == "mlgneko":
- room.message("https://w0bm.com/b/1455522064.webm")
- elif cmd == "kermit":
- room.message("http://img.pr0gramm.com/2015/03/21/1bc04bb2f7d1b772.gif")
- elif cmd == "bitchkermit":
- room.message("https://www.youtube.com/watch?v=UjN28wihjXw")
- elif cmd == "hurr" or cmd == "hurrdurr" or cmd == "durr":
- room.message("@boneranon: `hurr durr` ")
- elif cmd == "cuck" or cmd == "CUCK":
- room.message(random.choice(cuck))
- elif cmd == "megumin":
- room.message("https://www.youtube.com/watch?v=P49FraVNS_Y")
- elif cmd == "wall":
- room.message("http://i.imgur.com/aeXPRxH.gif")
- elif cmd == "epic" or cmd == "ftw":
- room.message("https://www.youtube.com/watch?v=_yThfdrdFL8")
- elif cmd == "noot":
- room.message("https://youtu.be/ePGQFJduC9Q")
- elif cmd == "fate" or cmd == "conch" or cmd == "8ball":
- room.message(random.choice(fuhqhacell) + " @" + user.name)
- elif cmd == "aniki" or cmd == "gachi":
- room.message(random.choice(gachi))
- elif cmd == "ubuntu":
- room.message("http://i.imgur.com/Mw93bwA.png")
- elif cmd == "dodger":
- room.message(random.choice(dodger))
- elif cmd == "bern":
- room.message("http://i.imgur.com/szgAYiu.png")
- elif cmd == "godtrump":
- room.message("http://puu.sh/nj9J0/41155ead24.gif http://puu.sh/nj9GM/420b2b6c5d.gif http://puu.sh/nj9Km/df6de226eb.gif")
- elif cmd == "specialist":
- room.message("http://i.imgur.com/3vStBgP.png http://i.imgur.com/3vStBgP.png http://i.imgur.com/3vStBgP.png")
- elif cmd == "nicespook":
- room.message("http://i.imgur.com/59B4hM1.gif http://i.imgur.com/59B4hM1.gif http://i.imgur.com/59B4hM1.gif")
- elif cmd == "kermitslam":
- room.message("http://puu.sh/np1N9/8d4424de0a.gif")
- elif cmd == "lewd":
- room.message("http://i.imgur.com/taMcJlU.gif")
- elif cmd == "hitler":
- room.message("https://a.pomf.cat/xartog.png")
- elif cmd == "nice":
- room.message(random.choice(nice))
- elif cmd == "topnice":
- room.message("http://i.imgur.com/HJnpzrz.png http://i.imgur.com/HJnpzrz.png http://i.imgur.com/HJnpzrz.png")
- elif cmd == "wickeddevil":
- room.message("https://www.youtube.com/watch?v=Wxp0SDAiXmI")
- elif cmd == "riko":
- room.message("https://w0bm.com/b/1455569789.webm")
- elif cmd == "ukip":
- room.message("https://w0bm.com/b/1455574217.webm")
- elif cmd == "kaka":
- room.message("http://i.imgur.com/FTXrRHf.png")
- elif cmd == "rain" or cmd == "rainthepain":
- room.message("http://i.imgur.com/8p4ier3.gif http://i.imgur.com/TIiZzLS.jpg http://i.imgur.com/EXKamF1.jpg")
- elif cmd == "manga":
- room.message("https://www.youtube.com/watch?v=HG8ZoUHdr0Q")
- elif cmd == "cmd" or cmd == "commands" or cmd == "cmds" or cmd == "help":
- room.message("Go to http://kingstream.tv/commands/ to see my commands =_= @" + user.name)
- elif cmd == "proxy" or cmd == "proxydemon" or cmd == "nyaa":
- room.message("https://a.pomf.cat/hdawcy.png")
- elif cmd == "jeb!" or cmd == "jeb":
- room.message("http://i.imgur.com/oSWlDGU.png PLEASE CLAP")
- elif cmd == "death":
- room.message("http://i.imgur.com/4lmd7hD.jpg")
- elif cmd == "awoo" or cmd == "awo" or cmd == "awooo":
- room.message("http://i.imgur.com/4derf6R.gif http://mp.x10.mx/pics/wofWinkClearCrop.gif http://i.imgur.com/TFHqUWg.gif")
- elif cmd == "rainirl":
- room.message("https://www.youtube.com/watch?v=vv_HRIrJ1aE")
- elif cmd == "ninja":
- room.message("http://i.imgur.com/74faPJP.png")
- elif cmd == "free" or cmd == "freetheanons" or cmd == "freetheanonsufuk":
- room.message("https://w0bm.com/b/1458151436.webm")
- elif cmd == "breadwater" or cmd == "bread" or cmd == "watertoast" or cmd == "toast":
- room.message("http://i.imgur.com/vdcHxEZ.jpg http://i.imgur.com/vdcHxEZ.jpg http://i.imgur.com/vdcHxEZ.jpg")
- elif cmd == "cuba" or cmd == "cubans" or cmd == "CUBA" or cmd == "CUBANS":
- room.message("http://i.imgur.com/h7mrObv.png")
- elif cmd == "cp" or cmd == "CP":
- room.message("WHY DON'T YOU HAVE A SEAT OVER HERE? http://i.imgur.com/fEaisK4.png")
- elif cmd == "rainmeme":
- room.message("http://i.imgur.com/IKp3jX8.png")
- elif cmd == "100":
- room.message("http://i.imgur.com/IwVl8SZ.png")
- elif cmd == "lol" or cmd == "LOL":
- room.message("http://i.imgur.com/o4Tk1rR.png")
- elif cmd == "mudpls":
- room.message("http://imgur.com/a/4qRyH")
- elif cmd == "announce":
- room.message("*warning*+25 WE'RE PLAYING DEADPOOL TODAY AT 10PM EST *warning*+25")
- elif cmd == "schedule":
- room.message("Please look at http://kingstream.tv/schedule/ for our schedule of planned streams")
- elif cmd == "penis":
- room.message("Fuck you @" + user.name)
- elif cmd == "bounce":
- room.message("http://i.imgur.com/eMyyKOJ.gif")
- elif cmd == "crown":
- room.message("http://i.imgur.com/NV2flLP.png Make sure the crown is visible")
- elif cmd == "hacell":
- room.message("http://i.imgur.com/9Qt1DWA.png http://i.imgur.com/rw3J7hE.png http://i.imgur.com/BJX4No8.png")
- elif cmd == "honkhonk":
- room.message("http://i.imgur.com/LF0bETi.gif")
- ##basic commands end##############################
- elif cmd == "moviename" or cmd == "np" or cmd == "nowplaying" or cmd == "currentlyplaying":
- #sorry about the shitty indents, we indent differently and the differences confuse me lol
- #be sure to look at http://localhost:13579/variables.html(view source!) to see what more info
- #you can grab, and capture it with regex.
- server="localhost"#Server hosing MPC 108.222.70.201
- port="13579"#this is the default web port for MPC
- rawRequest=urllib.request.urlopen("http://"+server+":"+port+"/variables.html").read().decode('utf-8')
- cpFileName=re.search('\<p id\=\"file\"\>(.*)\<\/p\>',rawRequest)
- if cpFileName:
- room.message("Currently playing: " + cpFileName.group(1))
- ##Check if Mod
- #not really important
- elif cmd == "ismod":
- user = ch.User(args)
- if room.getLevel(user) > 0:
- room.message("yesh")
- else:
- room.message("nope")
- except Exception as e:
- try:
- et, ev, tb = sys.exc_info()
- lineno = tb.tb_lineno
- fn = tb.tb_frame.f_code.co_filename
- room.message("[Expectation Failed] %s Line %i - %s"% (fn, lineno, str(e)))
- return
- except:
- room.message("Undescribeable error detected !!")
- return
- ##Other Crap here, Dont worry about it
- def onFloodWarning(self, room):
- room.reconnect()
- TestBot.easy_start(rooms,username,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement