Beispiel #1
0
    async def on_ready(self):
        LOGGER.info("Billy ready and running.")

        self.add_cog(Admin(self))
        self.add_cog(RNG(self))
        self.add_cog(Memes(self))
        self.add_cog(Nsfw(self))
        self.add_cog(Copypasta(self))
        self.add_cog(Stats(self))

        # TODO: this is ugly
        self.add_cog(Karma(self))
        self.karma = self.get_cog("Karma")

        self.add_cog(Interaction(self))
        self.interaction = self.get_cog("Interaction")

        await self._fetch_logging_channel()

        await self._set_presence()
        await self._init_timers()
Beispiel #2
0
    async def on_command(self, ctx):
        self.command_count += 1


if __name__ == '__main__':

    # Get configuration from file
    with open('credentials.json') as f:
        file_dict = json.load(f)
    token = file_dict['token']
    bungie_api_key = file_dict['d2-api-key']
    bungie_client_id = file_dict['client-id']

    bot = Spirit(token, bungie_api_key, bungie_client_id)

    # Add modules to bot
    bot.add_cog(Help(bot))
    bot.add_cog(Core(bot))
    bot.add_cog(Settings(bot))
    bot.add_cog(Events(bot))
    bot.add_cog(Register(bot))
    bot.add_cog(General(bot))
    bot.add_cog(Owner(bot))
    bot.add_cog(Roster(bot))
    bot.add_cog(Stats(bot))
    bot.add_cog(Item(bot))
    bot.add_cog(Loadout(bot))
    bot.add_cog(Destiny(bot))

    bot.run()
Beispiel #3
0
    def run(self):
        super().run(token, reconnect=True)

    async def on_command(self, ctx):
        self.command_count += 1


if __name__ == '__main__':

    with open('credentials.json') as f:
        file_dict = json.load(f)
    token = file_dict['token']
    api_key = file_dict['d2-api-key']

    destiny = pydest.Pydest(api_key)
    bot = Spirit(token)

    bot.add_cog(Core(bot))
    bot.add_cog(Destiny(bot, destiny))
    bot.add_cog(Events(bot))
    bot.add_cog(General(bot))
    bot.add_cog(Help(bot))
    bot.add_cog(Owner(bot))
    bot.add_cog(Roster(bot))
    bot.add_cog(Settings(bot))
    bot.add_cog(Stats(bot, destiny))
    bot.add_cog(Item(bot, destiny))

    bot.run()