def initialize(): defaultSettings = """PLS_REGEX = r"%s(,|\.+|!+)? +(pls|plz|please|why)" #%s is replaced with nickname PLS_MESSAGES = [ #what to say when people are dissatisfied with the behaviour of the bot "NO!", "it wasn't me", "shitty programming?", "this is all Yop's fault, I swear!", "oops", "pls urself", "no!", "nyet", "nein", ] NAME_REGEX = r"((hi|hello|sus|greetings|yo|hey|sup) +)?%s$" #%s is replaced with nickname NAME_MESSAGES = [ #what to say when people address the bot "sus", "beep", "boop", "beepboop" "bzzrt", "greetings", "hi", "yes?", "yes, this is gadget" ] """ load_secondary_settings("interaction", defaultSettings) subscribe(scan_name) subscribe(scan_pls)
def initialize(): defaultSettings = """MARKERS = ["sus", "hi"] #send greetings when somebody sends a message consisting of only these strings TIMEOUT = 10 #time to wait, in seconds, before responding to greetings again #prevents greeting everyone else who is greeting the original person TRANSLATIONS = { #what to greet certain people with "goppend": ["gopsus", "hi goppend", "heil goppend"], } """ load_secondary_settings("greet", defaultSettings) subscribe(scan)
def __init__(self): self.handlers = None self.scriptPaths = None subscribe(self.handle_incoming)
def initialize(): subscribe(scan)
def initialize(): register_command(handle_imgur) subscribe(scan_imgur_links)
def initialize(): subscribe(scan_name) subscribe(scan_pls)