Experimental Discord bot written in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930
  1. """
  2. Rocketbot Discord bot. Relies on a configured config.py (copy config.py.sample for a template) and
  3. the sqlite database rocketbot.db (copy rocketbot.db.sample for a blank database).
  4. Author: Ian Albert (@rocketsoup)
  5. Date: 2021-11-11
  6. """
  7. from discord import Intents
  8. from discord.ext import commands
  9. from config import CONFIG
  10. from cogs.configcog import ConfigCog
  11. # from cogs.crosspostcog import CrossPostCog
  12. from cogs.generalcog import GeneralCog
  13. from cogs.joinraidcog import JoinRaidCog
  14. class Rocketbot(commands.Bot):
  15. def __init__(self, command_prefix, **kwargs):
  16. super().__init__(command_prefix, **kwargs)
  17. intents = Intents.default()
  18. intents.messages = True
  19. intents.members = True # To get join/leave events
  20. bot = Rocketbot(command_prefix=CONFIG['commandPrefix'], intents=intents)
  21. bot.add_cog(GeneralCog(bot))
  22. bot.add_cog(ConfigCog(bot))
  23. bot.add_cog(JoinRaidCog(bot))
  24. # bot.add_cog(CrossPostCog(bot))
  25. bot.run(CONFIG['clientToken'], bot=True, reconnect=True)
  26. print('\nBot aborted')