def get(parameter, channel, author, folder): help = [] help.append("!seen [nick] Millal kasutaja viimati kanalis viibis") for i in marjubot.COMMAND_PLUGINS.keys(): plugin = pluginloader.load(marjubot.COMMAND_PLUGINS[i]) help.append(formatCommands(plugin.getCommands()) + plugin.getInfo()) return help
def interceptorWorker(self, interceptor, msg, channel, author): plugin = pluginloader.load(INTERCEPTOR_PLUGINS[interceptor]) responseType = plugin.getResponseType() response = plugin.get(msg, author, self.channels[channel].folder) self.sendResponse(response, responseType, channel, author)
def commandWorker(self, cmd, parameter, channel, author): plugin = pluginloader.load(COMMAND_PLUGINS[cmd]) responseType = plugin.getResponseType() response = plugin.get(parameter, channel, author, self.channels[channel].folder) self.sendResponse(response, responseType, channel, author)
def get(parameter, channel, author, folder): help = [] help.append("!seen [nick] - millal kasutaja viimati kanalis viibis") for i in COMMAND_PLUGINS.keys(): help.append(pluginloader.load(COMMAND_PLUGINS[i]).getInfo()) return help
def findPluginByCommand(self, cmd): for plugin in COMMAND_PLUGINS.values(): if cmd in plugin["commands"]: return pluginloader.load(plugin) return None