def setup(bot: botto.Botto) -> None: bot._old_help_command = bot.help_command bot.help_command = HelpCommand( color=botto.config["MAIN_COLOR"], verify_checks=False, command_attrs={"help": "Show help information."}, )
def setup(bot: botto.Botto) -> None: bot.add_cog(Events(bot))
def teardown(bot: botto.Botto) -> None: bot.help_command = bot._old_help_command del bot._old_help_command
def setup(bot: botto.Botto) -> None: bot.add_cog(Meta(bot))
def setup(bot: botto.Botto) -> None: bot.add_cog(Owner(bot))
dpy_logger.setLevel(logging.WARNING) logger: logging.Logger = logging.getLogger("botto") logger.setLevel(logging.INFO) formatter: logging.Formatter = logging.Formatter( "[{asctime}] [{levelname:>8}] {name}: {message}", style="{") stream_handler: logging.StreamHandler = logging.StreamHandler(sys.stdout) file_handler: logging.FileHandler = logging.FileHandler(filename="botto.log", encoding="utf-8", mode="w") error_file_handler: logging.FileHandler = logging.FileHandler( filename="error.log", encoding="utf-8", mode="w") stream_handler.setFormatter(formatter) file_handler.setFormatter(formatter) error_file_handler.setFormatter(formatter) error_file_handler.setLevel(logging.ERROR) dpy_logger.addHandler(stream_handler) dpy_logger.addHandler(file_handler) dpy_logger.addHandler(error_file_handler) logger.addHandler(stream_handler) logger.addHandler(file_handler) logger.addHandler(error_file_handler) # Bot bot: Botto = Botto() bot.run()
def setup(bot: botto.Botto) -> None: cog = KanjiSearch(bot) bot.add_cog(cog)
def setup(bot: botto.Botto) -> None: bot.add_cog(RestrictedApi(bot))
def setup(bot: botto.Botto) -> None: bot.add_cog(Music(bot))
def setup(bot: botto.Botto) -> None: cog = Jisho(bot) bot.add_cog(cog)
def setup(bot: botto.Botto) -> None: cog = Shiritori(bot) bot.add_cog(cog)