Ejemplo n.º 1
0
    def __init__(self, client):
        DefaultBotCommandHandler.__init__(self, client)

        working_set = getPkgResourcesWorkingSet()
        extendCommandClass(working_set, self, 'oyoyo_bot.commands', client)  

        for command, fnc in config['commands'].iteritems():
            ep = pkg_resources.EntryPoint.parse("%s = %s" % (command, fnc))
            if not ep.dist: 
                ep.dist = pkg_resources.get_distribution('oyoyo_bot')
            extendCommandClassWithEP(self, ep, client)