Experimental Discord bot written in Python
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728
  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.generalcog import GeneralCog
  12. from cogs.joinraidcog import JoinRaidCog
  13. class Rocketbot(commands.Bot):
  14. def __init__(self, command_prefix, **kwargs):
  15. super().__init__(command_prefix, **kwargs)
  16. intents = Intents.default()
  17. intents.messages = True
  18. intents.members = True # To get join/leave events
  19. bot = Rocketbot(command_prefix=CONFIG['commandPrefix'], intents=intents)
  20. bot.add_cog(GeneralCog(bot))
  21. bot.add_cog(ConfigCog(bot))
  22. bot.add_cog(JoinRaidCog(bot))
  23. bot.run(CONFIG['clientToken'], bot=True, reconnect=True)
  24. print('\nBot aborted')