Find file
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (36 sloc) 1.3 KB
import pyrc
import pyrc.utils.hooks as hooks
class GangstaBot(pyrc.Bot):
def info(self, target, sender):
"will print the target and sender to the console"
print("target: %s, sender: %s" % (target, sender))
def bling(self, target, sender):
"will print yo"
if target.startswith("#"):
self.message(target, "%s: yo" % sender)
self.message(sender, "yo")
def repeat(self, target, sender, **kwargs):
"will repeat whatever yo say"
if target.startswith("#"):
self.message(target, kwargs["msg"])
self.message(sender, kwargs["msg"])
def stopword(self, target, sender, *args):
will repeat 'lol', 'lmao, 'rofl' or 'roflmao' when seen in a message
only applies to channel messages
if target.startswith("#"):
self.message(target, args[0])
def keeprepeating(self):
"will say something"
self.message("#turntechgodhead", "stop repeating myself")
if __name__ == '__main__':
bot = GangstaBot('', channels = ['#turntechgodhead'])