示例#1
0
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()
示例#2
0
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()
示例#3
0
def setup(bot: PikalaxBOT):
    bot.add_cog(SeenUser(bot))
示例#4
0
def setup(bot: PikalaxBOT):
    bot.add_cog(ChatDeathIndex(bot))
示例#5
0
def setup(bot: PikalaxBOT):
    bot.add_cog(MemberWatch(bot))
示例#6
0
def setup(bot: PikalaxBOT):
    bot.add_cog(YouTube(bot))
示例#7
0
def setup(bot: PikalaxBOT):
    bot.add_cog(Groudonger(bot))