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.
Lowers minimum Python requirement from 3.11 to 3.10 to increase compatibility while updating CI to use Python 3.13 for testing.
Extracts hybrid command functionality into a separate module to improve code organization and reduce complexity in the main commands module.
Updates test timeouts and dependency versions to ensure reliable test execution and modern package compatibility.
The _compute_permissions helper function has been simplified by delegating the complex permission calculation logic to a new channel.permissions_for(member) method.
This refactoring encapsulates the permission logic within the Channel model, where it belongs. It removes duplicate and complex code from the command decorator, improving maintainability and separation of concerns.
The tests for requires_permissions have been updated to mock the new permissions_for method, resulting in cleaner tests that are no longer concerned with the internal implementation details of how permissions are calculated.