コード例 #1
0
ファイル: interaction.py プロジェクト: Yoplitein/gadget
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)
コード例 #2
0
ファイル: greet.py プロジェクト: Yoplitein/gadget
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)
コード例 #3
0
ファイル: commands.py プロジェクト: Yoplitein/gadget
 def __init__(self):
     self.handlers = None
     self.scriptPaths = None
     
     subscribe(self.handle_incoming)
コード例 #4
0
ファイル: greet.py プロジェクト: 4rChon/gadget
def initialize():
    subscribe(scan)
コード例 #5
0
ファイル: imgur.py プロジェクト: Yoplitein/gadget
def initialize():
    register_command(handle_imgur)
    subscribe(scan_imgur_links)
コード例 #6
0
ファイル: interaction.py プロジェクト: 4rChon/gadget
def initialize():
    subscribe(scan_name)
    subscribe(scan_pls)