Allow extension `setup` functions to be asynchronous. The loader now checks if `module.setup` returns an awaitable and runs it using asyncio, handling cases where an event loop is already running or not.
This enables extensions to perform asynchronous initialization tasks.
Adds millisecond latency property to gateway and client for more precise monitoring.
Enhances ping command to display gateway latency for better debugging.
Configures message content intent and mention replies for improved bot functionality.
Adds dotenv support for cleaner environment variable management.
Formats error classes for better code consistency and readability.
Implements specific exception classes for all Discord API error codes to provide more granular error handling and better debugging experience.
Creates individual exception classes for each Discord error code (10001-520006) with descriptive names and documentation strings that include the official error messages and codes.
Updates HTTP client to automatically map Discord error codes to their corresponding exception classes, allowing developers to catch specific error types rather than generic HTTP exceptions.
Includes comprehensive test coverage for the new error code mapping functionality to ensure correct exception raising based on API responses.
Replaces deprecated get_event_loop() with proper running loop detection and fallback to new loop creation for better asyncio compatibility.
Fixes test suite by replacing manual Client instantiation with proper constructor calls, ensuring all internal caches and attributes are correctly initialized.
Updates cache access patterns to use new cache API methods consistently across the codebase.