Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import ch
- import random
- import sys
- import re
- from random import randint
- if sys.version_info[0] > 2:
- import urllib.request as urlreq
- else:
- import urllib2 as urlreq
- class TestBot(ch.RoomManager):
- def onInit(self):
- self.setNameColor("F9F")
- self.setFontColor("F33")
- self.setFontFace("1")
- self.setFontSize(10)
- self.enableBg()
- self.enableRecording()
- def onMessage(self, room, user, message):
- try:
- if room.getLevel(self.user) > 0:
- print(user.name, message.body)
- else:
- print(user.name, message.body)
- if self.user == user: return
- 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], ""
- x1= ['What year is it?',
- '>TFW no ralfjack',
- 'No bully ;-;',
- 'This movie sucks.',
- 'Are you an alcoholic?',
- 'What do you think about Donald Trump?',
- ]
- conch= ['Maybe someday.',
- 'Do nothing.',
- 'I dont think so.',
- 'No.',
- 'Yes.',
- 'It is certain.',
- ]
- judge = ['http://i.imgur.com/2049sdQ.png',
- 'http://i.imgur.com/4qiQJ0t.png',
- 'http://i.imgur.com/i1IvTY5.png',
- 'http://i.imgur.com/8rtFJg9.png',
- 'http://i.imgur.com/q3rWsyK.png',
- 'http://i.imgur.com/cdyBlFU.png',
- 'http://i.imgur.com/8qDEi0X.png',
- 'http://i.imgur.com/I18qikm.png',
- 'http://i.imgur.com/XzKYeOl.png',
- 'http://i.imgur.com/XDV8you.png',
- ]
- jojo = ['http://i.imgur.com/IQtjkM2.jpg',
- 'http://i.imgur.com/1yzW8gF.jpg',
- 'http://i.imgur.com/QjDd6Kc.jpg',
- 'http://i.imgur.com/dvbrzKP.jpg',
- 'http://i.imgur.com/GePQ5Xf.jpg',
- 'http://i.imgur.com/N4lmUpQ.jpg',
- 'http://i.imgur.com/WZMIjxi.jpg',
- 'http://i.imgur.com/nRqvpVS.png',
- 'http://i.imgur.com/q21lDdw.jpg',
- 'http://i.imgur.com/jdyR6rE.jpg',
- 'http://i.imgur.com/uaHYOau.jpg',
- 'http://i.imgur.com/D9729HQ.jpg',
- 'http://i.imgur.com/y9N7lNM.jpg',
- 'http://i.imgur.com/KOrqDes.jpg',
- 'http://i.imgur.com/3ffsEVj.png',
- 'http://i.imgur.com/UILZlrz.jpg',
- 'http://i.imgur.com/aCBga9t.jpg',
- 'http://i.imgur.com/KTLijuq.png',
- ]
- class TestBot(ch.RoomManager):
- def onInit(self):
- self.setNameColor("6633FF")
- self.setFontColor("6633FF")
- self.setFontFace("0")
- self.setFontSize(14)
- self.enableBg()
- self.enableRecording()
- def onConnect(self, room):
- print("Connected to "+room.name)
- def onReconnect(self, room):
- print("Reconnected to "+room.name)
- def onDisconnect(self, room):
- print("Disconnected from "+room.name)
- def onMessage(self, room, user, message):
- # Use with PsyfrBot framework? :3
- self.safePrint(user.name + ': ' + message.body)
- if message.body.startswith("!cmds"):
- room.message("commands: !conch !lulz !magestream !randomuser !hack !spooky !tfw !ayylmao !wewlad !flip !normies !loveme !shitmovie !mexico !rate !conch")
- if message.body.startswith("!magestream"):
- room.message(random.choice(jojo))
- if message.body.startswith("!conch"):
- room.message(random.choice(conch))
- if message.body.startswith("!judge"):
- room.message(random.choice(judge))
- #################
- # golora ai #####
- try:
- cmd, args = message.body.split(" ", 1)
- except:
- cmd, args = message.body, ""
- if cmd[0] == "!":
- prfx = True
- cmd = cmd[1:]
- else:
- prfx = False
- if cmd.lower() == "test" and prfx:
- room.message("This is a test code.")
- ################
- # cmds #########
- if message.body.startswith("@golora"):
- room.message(random.choice(x1))
- if message.body.startswith("where is"):
- room.message('dunno, ' + user.name + ' loves ' + args +'.')
- if message.body.startswith("!penis"):
- room.message("https://www.youtube.com/watch?v=0hrM2biD7g4")
- if message.body.startswith("!scandilove"):
- room.message("http://i.imgur.com/sL5YhsN.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/LVi3PVW.gif")
- if message.body.startswith("!baltlove"):
- room.message("http://i.imgur.com/oStDCw5.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/1J0TUpN.gif")
- if message.body.startswith("!nalove"):
- room.message("http://i.imgur.com/MQDW25V.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/tUln5pi.gif")
- if message.body.startswith("!slavlove"):
- room.message("http://i.imgur.com/BKCSyCA.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/56q2ZRN.gif")
- if message.body.startswith("!epic"):
- room.message("https://www.youtube.com/watch?v=_yThfdrdFL8")
- if message.body.startswith("!dance"):
- room.message("http://i.imgur.com/OgDXHh7.gif")
- if message.body.startswith("!clock"):
- room.message("http://ichef.bbci.co.uk/news/976/cpsprodpb/8123/production/_85595033_clock_irving_police_ap.jpg")
- if message.body.startswith("!shoe"):
- room.message("http://imgur.com/a/Bh8iH")
- if message.body.startswith("!ci"):
- room.message("http://i.imgur.com/t1DCBEL.png")
- if message.body.startswith("!hack"):
- room.message("http://i.imgur.com/2rhkZZr.gif http://i.imgur.com/2rhkZZr.gif http://i.imgur.com/2rhkZZr.gif")
- if message.body.startswith("!ban"):
- room.message("BANNED!")
- if message.body.startswith("!superban"):
- room.message("SUPERBANNED!")
- if message.body.startswith("big guy"):
- room.message("for you")
- if message.body.startswith("!test"):
- room.message("test complete")
- if message.body.startswith("!spooky"):
- room.message("http://i.imgur.com/mrFLUKC.gif http://i.imgur.com/mrFLUKC.gif http://i.imgur.com/mrFLUKC.gif")
- if message.body.startswith("!tfw"):
- room.message("http://i.imgur.com/amLX3WL.gif http://i.imgur.com/amLX3WL.gif http://i.imgur.com/amLX3WL.gif")
- if message.body.startswith("!ayylmao"):
- room.message("http://i.imgur.com/IwxvZMS.gif http://i.imgur.com/IwxvZMS.gif http://i.imgur.com/IwxvZMS.gif")
- if message.body.startswith("!isis"):
- room.message("http://i.imgur.com/rbjqEFP.gif http://i.imgur.com/rbjqEFP.gif http://i.imgur.com/rbjqEFP.gif")
- if message.body.startswith("!wew"):
- room.message("https://www.youtube.com/watch?v=UPtQFI4qeoE")
- if message.body.startswith("!anons"):
- room.message("http://i.imgur.com/iZ4hMgK.gif http://i.imgur.com/Y5vnRI3.gif http://i.imgur.com/G2D7iFF.gif")
- if message.body.startswith("!flip"):
- room.message("(ᕗ ಠ︡益︠ಠ︠)ᕗ︵ ┻┻")
- if message.body.startswith("!normies"):
- room.message("https://www.youtube.com/watch?v=3qnkOROvhgk")
- if message.body.startswith("!loveme"):
- room.message("(っ◔◡◔)っ ❤")
- if message.body.startswith("!shitmovie"):
- room.message("http://i.imgur.com/lYU2co6.png")
- if message.body.startswith("!mexico"):
- room.message("http://i.imgur.com/UEr2skG.gif http://i.imgur.com/UEr2skG.gif http://i.imgur.com/UEr2skG.gif")
- def onFloodBan(self, room):
- print("You are flood banned in "+room.name)
- def onPMMessage(self, pm, user, body):
- self.safePrint('PM: ' + user.name + ': ' + body)
- pm.message(user, body) # echo
- if cmd == "randomuser":
- room.message(random.choice(room.usernames))
- rooms = ["magestreambeta"]
- username = "golora"
- password = "X"
- TestBot.easy_start(rooms,username,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement