示例#1
0
文件: help.py 项目: norinorin/nokari
 def __init__(self, bot: Bot) -> None:
     super().__init__()
     self.bot = bot
     self.old_help_command = bot.help_command
     bot.help_command = CustomHelp(bot)
     bot.remove_command("help")
     bot.add_command(_help_cmd)
示例#2
0
    def __init__(self, bot: Bot):
        super().__init__()
        self.bot = bot

        if GUILD_LOGS_WEBHOOK_URL:
            webhook_id, webhook_token = GUILD_LOGS_WEBHOOK_URL.strip(
                "/").split("/")[-2:]
            self.execute_webhook = partial(self.bot.rest.execute_webhook,
                                           int(webhook_id), webhook_token)

            for event_type, callback in self.optional_events:
                bot.subscribe(event_type, callback)
示例#3
0
文件: utils.py 项目: norinorin/nokari
def unload(bot: Bot) -> None:
    bot.remove_plugin("Utils")
示例#4
0
文件: utils.py 项目: norinorin/nokari
def load(bot: Bot) -> None:
    bot.add_plugin(Utils(bot))
示例#5
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Events")
示例#6
0
def load(bot: Bot) -> None:
    bot.add_plugin(Events(bot))
示例#7
0
文件: help.py 项目: norinorin/nokari
def unload(bot: Bot) -> None:
    bot.remove_plugin("Help")
示例#8
0
文件: help.py 项目: norinorin/nokari
def load(bot: Bot) -> None:
    bot.add_plugin(Help(bot))
示例#9
0
文件: admin.py 项目: norinorin/nokari
def unload(bot: Bot) -> None:
    bot.remove_plugin("Admin")
示例#10
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Config")
示例#11
0
文件: admin.py 项目: norinorin/nokari
def load(bot: Bot) -> None:
    bot.add_plugin(Admin(bot))
示例#12
0
def load(bot: Bot) -> None:
    bot.add_plugin(Config(bot))
示例#13
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Errors")
示例#14
0
def load(bot: Bot) -> None:
    bot.add_plugin(Errors(bot))
示例#15
0
def unload(bot: lightbulb.Bot):
    bot.remove_plugin("SuperUser")
示例#16
0
def load(bot: lightbulb.Bot):
    bot.add_plugin(SuperUser())