The full API Reference can be found by viewing the individual pages in the sidebar or by scrolling to the bottom of this page.
This module uses the Python logging module to log diagnostic and errors in an output independent way. If the logging module is not configured, these logs will not be output anywhere. See Setting Up Logging for more information on how to set up and use the logging module with disnake.
Abstract Base Classes¶
An abstract base class (also known as an
abc) is a class that models can inherit
to get their behaviour. Abstract base classes should not be instantiated.
They are mainly there for usage with
Models are classes that are received from Discord and are not meant to be created by the user of the library.
Classes marked as models are not intended to be created by users and are also read-only.
If you want to get one of these model classes instances they’d have to be through
the cache, and a common way of doing so is through the
or attributes of model classes that you receive from the Events.
Nearly all models have __slots__ defined which means that it is impossible to have dynamic attributes on them.
Some classes are just there to be data containers. We call them data classes.
Unlike models you are allowed to create most of these yourself, even if they can also be used to hold attributes.
Nearly all data classes have __slots__ defined which means that it is impossible to have dynamic attributes on them.
The only exception to this rule is
Object, which is made with
dynamic attributes in mind.
The API provides some enumerations for certain types of values to avoid the API from being typed as literals in case the values change in the future.
All enumerations are subclasses of an internal class which mimics the behaviour
- Abstract Base Classes
- Application Commands
- Application Info
- Audit Logs
- Bot UI Kit
- Exceptions and Warnings
- Guild Scheduled Events
- Stage Instances