def main(): """The main function that runs the bot. Syntax: python3.6 bot.py [--settings SETTINGSFILE] [--logfile LOGFILE] --settings SETTINGSFILE: a JSON file denoting the bot's settings. See README.md for details. Defaults to settings.json --logfile LOGFILE: the file to which the logging module will output bot events. This file will be overwritten. Defaults to bot.log """ parser = argparse.ArgumentParser() parser.add_argument('--settings', default='settings.json') parser.add_argument('--logfile', default='bot.log') args = parser.parse_args() bot = PikalaxBOT(args.settings, args.logfile) @bot.before_invoke async def before_invoke(ctx): ctx.cog.fetch() @bot.after_invoke async def after_invoke(ctx): ctx.cog.commit() bot.run()
def main(): parser = argparse.ArgumentParser() parser.add_argument('--settings', default='settings.json') parser.add_argument('--logfile', default='bot.log') args = parser.parse_args() bot = PikalaxBOT(args.settings, args.logfile) bot.run()
def setup(bot: PikalaxBOT): bot.add_cog(SeenUser(bot))
def setup(bot: PikalaxBOT): bot.add_cog(ChatDeathIndex(bot))
def setup(bot: PikalaxBOT): bot.add_cog(MemberWatch(bot))
def setup(bot: PikalaxBOT): bot.add_cog(YouTube(bot))
def setup(bot: PikalaxBOT): bot.add_cog(Groudonger(bot))