Exemplo n.º 1
0
 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)
Exemplo n.º 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)
Exemplo n.º 3
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Utils")
Exemplo n.º 4
0
def load(bot: Bot) -> None:
    bot.add_plugin(Utils(bot))
Exemplo n.º 5
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Events")
Exemplo n.º 6
0
def load(bot: Bot) -> None:
    bot.add_plugin(Events(bot))
Exemplo n.º 7
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Help")
Exemplo n.º 8
0
def load(bot: Bot) -> None:
    bot.add_plugin(Help(bot))
Exemplo n.º 9
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Admin")
Exemplo n.º 10
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Config")
Exemplo n.º 11
0
def load(bot: Bot) -> None:
    bot.add_plugin(Admin(bot))
Exemplo n.º 12
0
def load(bot: Bot) -> None:
    bot.add_plugin(Config(bot))
Exemplo n.º 13
0
def unload(bot: Bot) -> None:
    bot.remove_plugin("Errors")
Exemplo n.º 14
0
def load(bot: Bot) -> None:
    bot.add_plugin(Errors(bot))
Exemplo n.º 15
0
def unload(bot: lightbulb.Bot):
    bot.remove_plugin("SuperUser")
Exemplo n.º 16
0
def load(bot: lightbulb.Bot):
    bot.add_plugin(SuperUser())