Esempio n. 1
0
File: bot.py Progetto: gflerm/seejoo
 def _register_meta_commands(self):
     ''' Registers the "meta" commands,
     i.e. those handled by the bot itself.
     '''
     for cmd, doc in ext.BOT_COMMANDS.iteritems():
         func = functools.partial(self._handle_command, cmd)
         func.__doc__ = doc
         ext.register_command(cmd, func)
Esempio n. 2
0
 def __init__(self, *args, **kwargs):
     ''' Initializer. '''
     self.nickname = config.nickname
     
     for cmd, doc in ext.BOT_COMMANDS.iteritems():
         func = functools.partial(self._handle_command, cmd)
         func.__doc__ = doc
         ext.register_command(cmd, func)
         
     self._import_commands()
     self._import_plugins()