Exemplo n.º 1
0
    def initialize_bot(self, discord_bot: discord.ext.commands.Bot) -> None:
        """
        initializes a discord bot with commands and listeners on this pseudo cog class

        :param: discord_bot: the discord_bot to initialize
        """
        discord_bot.add_listener(self.on_ready)
        discord_bot.add_listener(self.on_message)

        if self.discord_version_enabled:
            discord_bot.add_command(
                Command(self.version,
                        name="version",
                        pass_context=True,
                        ignore_extra=False,
                        help="display the plugin's version information"))
Exemplo n.º 2
0
def setup(bot: discord.ext.commands.Bot):
    bot.add_command(roll)
Exemplo n.º 3
0
def setup(bot: discord.ext.commands.Bot):
    bot.add_command(version)