forked from python-discord/bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Implement centralized detection of extension (cog) load failures during bot startup (and reloads?). Currently, failures may occur silently because extension loading is scheduled asynchronously, and exceptions are not surfaced clearly.
load_extensions()schedules tasks.- Exceptions occur inside async tasks.
- Failures may only appear in logs/Sentry.
- The bot may run partially degraded without moderator awareness.
Tasks
- Wrap
Bot.load_extension()in try/except. - Catch any errors.
- Track extension that failed to load.
- Unit test for failure detection.
Related
The methods load_extensions() and _load_extensions() are relevant and might need to be overwritten: https://github.com/python-discord/bot-core/blob/74072b3709d87dc811a4972aec1ef172101e49bf/pydis_core/_bot.py#L163
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request