Esempio n. 1
0
def generate_hook():
	global command_expression
	if command_expression is not None:
		bot.remove_command(command_expression)
	static_response.__doc__ = generate_docstring()
	command_expression = generate_expression()
	bot.add_command(command_expression, static_response)
Esempio n. 2
0
def modify_commands(commands):
    bot.remove_command(generate_expression(storage.data["responses"]))
    storage.data["responses"] = {k.lower(): v for k, v in commands.items()}
    storage.save()
    static_response.__doc__ = generate_docstring()
    bot.add_command(generate_expression(storage.data["responses"]),
                    static_response)
Esempio n. 3
0
def generate_hook():
    global command_expression
    if command_expression is not None:
        bot.remove_command(command_expression)
    static_response.__doc__ = generate_docstring()
    command_expression = generate_expression()
    bot.add_command(command_expression, static_response)
Esempio n. 4
0
def modify_explanations(commands):
    bot.remove_command("explain " +
                       generate_expression(storage.data["explanations"]))
    storage.data["explanations"] = {k.lower(): v for k, v in commands.items()}
    storage.save()
    explain_response.__doc__ = generate_explain_docstring()
    bot.add_command(
        "explain " + generate_expression(storage.data["explanations"]),
        explain_response)
Esempio n. 5
0
def modify_explanations(commands):
    bot.remove_command("explain " + generate_expression(storage.data["explanations"]))
    storage.data["explanations"] = {k.lower(): v for k,v in commands.items()}
    storage.save()
    explain_response.__doc__ = generate_explain_docstring()
    bot.add_command("explain " + generate_expression(storage.data["explanations"]), explain_response)
Esempio n. 6
0
def modify_commands(commands):
    bot.remove_command(generate_expression(storage.data["responses"]))
    storage.data["responses"] = {k.lower(): v for k,v in commands.items()}
    storage.save()
    static_response.__doc__ = generate_docstring()
    bot.add_command(generate_expression(storage.data["responses"]), static_response)