- Set up a cog with a task as the documentation specifies
- Construct the bot with your own event loop:
LOOP = asyncio.new_event_loop()
BOT = commands.Bot(
loop=LOOP,
command_prefix="/",
)
- Run the bot:
pdm run python -m example
orpdm run python ./src/example/__main__.py
- Observe that BrokenCog never logs after it initializes
Also note that removing the user-added event loop fixes the issue, but may not be desirable to some users needing an event loop for other work before they initialize the bot.