Experimental Discord bot written in Python
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

rocketbot.py 921B

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')