allows to control the behaviour of the bot during runtime

this class only does the work, you need another class, most suitable is a bot-module, to have a userinterface

Method __init__ Undocumented
Method register_command Add a command to the control service @type f: callable @param f: the callable to be called, when the command is issued
Method handle_command parse the commandstring and handle the command
Method help get help information for arguments *args (parsed strings from a command, i.e. "ircClient", "disconnect")
Method getlog get the n most recent loglines, of specify an offset to get earlier lines
Method _exec execute function f with *args or return a usage info if the arguments were wrong (too much/too little)
Method _get_usage get a usage info for function f
Method _cmd_config Undocumented
Method _cmd_config_reload Undocumented
Method _cmd_config_set set a configvalue. syntax for argument: [network=net] [channel=chan] module.setting newvalue
Method _cmd_config_get get a configvalue
def __init__(self, root, parent): (source)
Undocumented
def register_command(self, f, namespace=None, name=None): (source)

Add a command to the control service

Parametersfthe callable to be called, when the command is issued (type: callable)
def handle_command(self, string): (source)

parse the commandstring and handle the command

the string is parsed into commands, and they are searched in the commandList-tree the function returns an answerstring or that the command was ambigious

def _exec(self, f, args): (source)

execute function f with *args or return a usage info if the arguments were wrong (too much/too little)

def _get_usage(self, f): (source)

get a usage info for function f

def help(self, *args): (source)

get help information for arguments *args (parsed strings from a command, i.e. "ircClient", "disconnect")

def getlog(self, numlines=3, offset=0): (source)

get the n most recent loglines, of specify an offset to get earlier lines

def _cmd_config(self, argument): (source)
Undocumented
def _cmd_config_reload(self, argument): (source)
Undocumented
def _cmd_config_set(self, argument): (source)

set a configvalue. syntax for argument: [network=net] [channel=chan] module.setting newvalue

def _cmd_config_get(self, argument): (source)

get a configvalue

API Documentation for OtfBot, generated by pydoctor at 2020-03-04 02:00:06.