| 123456789101112131415161718192021222324252627 |
- """
- Rocketbot Discord bot. Relies on a configured config.py (copy config.py.sample for a template) and
- the sqlite database rocketbot.db (copy rocketbot.db.sample for a blank database).
-
- Author: Ian Albert (@rocketsoup)
- Date: 2021-11-11
- """
- from discord import Intents
- from discord.ext import commands
-
- from config import CONFIG
- from cogs.configcog import ConfigCog
- from cogs.generalcog import GeneralCog
- from cogs.joinraidcog import JoinRaidCog
-
- class Rocketbot(commands.Bot):
- def __init__(self, command_prefix, **kwargs):
- super().__init__(command_prefix, **kwargs)
-
- intents = Intents.default()
- intents.members = True # To get join/leave events
- bot = Rocketbot(command_prefix=CONFIG['commandPrefix'], intents=intents)
- bot.add_cog(GeneralCog(bot))
- bot.add_cog(ConfigCog(bot))
- bot.add_cog(JoinRaidCog(bot))
- bot.run(CONFIG['clientToken'], bot=True, reconnect=True)
- print('\nBot aborted')
|