Internal
These are events dispatched by the client. This is intended as a reference so you know what data to expect for each event.
Example Usage
To listen to an event, use the listen
decorator:
1 2 3 4 5 6 |
|
For more information, including other ways to listen to events, see the events guide.
Warning
While all of these events are documented, not all of them are used, currently.
AutocompleteCompletion
¶
Bases: BaseEvent
Dispatched after the library ran any autocomplete callback.
Source code in interactions/api/events/internal.py
170 171 172 173 174 |
|
AutocompleteError
¶
Bases: _Error
Dispatched when the library encounters an error in an autocomplete.
Source code in interactions/api/events/internal.py
215 216 217 218 219 |
|
ButtonPressed
¶
Bases: Component
Dispatched when a user uses a Button.
Source code in interactions/api/events/internal.py
146 147 148 |
|
CallbackAdded
¶
Bases: BaseEvent
Dispatched when a callback is added to the client.
Source code in interactions/api/events/internal.py
257 258 259 260 261 262 263 264 |
|
CommandCompletion
¶
Bases: BaseEvent
Dispatched after the library ran any command callback.
Source code in interactions/api/events/internal.py
156 157 158 159 160 |
|
CommandError
¶
Bases: _Error
Dispatched when the library encounters an error in a command.
Source code in interactions/api/events/internal.py
201 202 203 204 205 |
|
Component
¶
Bases: BaseEvent
Dispatched when a user uses a Component.
Source code in interactions/api/events/internal.py
139 140 141 142 143 |
|
ComponentCompletion
¶
Bases: BaseEvent
Dispatched after the library ran any component callback.
Source code in interactions/api/events/internal.py
163 164 165 166 167 |
|
ComponentError
¶
Bases: _Error
Dispatched when the library encounters an error in a component.
Source code in interactions/api/events/internal.py
208 209 210 211 212 |
|
Connect
¶
Bases: BaseEvent
The bot is now connected to the discord Gateway.
Source code in interactions/api/events/internal.py
80 81 82 |
|
Disconnect
¶
Bases: BaseEvent
The bot has just disconnected.
Source code in interactions/api/events/internal.py
90 91 92 |
|
Error
¶
Bases: _Error
Dispatched when the library encounters an error.
Source code in interactions/api/events/internal.py
191 192 193 194 195 196 197 198 |
|
ExtensionCommandParse
¶
Bases: ExtensionLoad
Dispatched when an extension is parsed for commands.
Source code in interactions/api/events/internal.py
249 250 251 252 253 254 |
|
callables: list[tuple[str, typing.Callable]] = attrs.field(repr=False, default=None)
class-attribute
¶
The callables that were parsed for commands
ExtensionLoad
¶
Bases: BaseEvent
Dispatched when an extension is loaded.
Source code in interactions/api/events/internal.py
229 230 231 232 233 234 235 236 237 238 239 |
|
ExtensionUnload
¶
Bases: ExtensionLoad
Dispatched when an extension is unloaded.
Source code in interactions/api/events/internal.py
242 243 244 245 246 |
|
Login
¶
Bases: BaseEvent
The bot has just logged in.
Source code in interactions/api/events/internal.py
75 76 77 |
|
ModalCompletion
¶
Bases: BaseEvent
Dispatched after the library ran any modal callback.
Source code in interactions/api/events/internal.py
177 178 179 180 181 |
|
ModalError
¶
Bases: _Error
Dispatched when the library encounters an error in a modal.
Source code in interactions/api/events/internal.py
222 223 224 225 226 |
|
Ready
¶
Bases: BaseEvent
The client is now ready.
Note
Don't use this event for things that must only happen once, on startup, as this event may be called multiple times. Instead, use the Startup
event
Source code in interactions/api/events/internal.py
120 121 122 123 124 125 126 127 128 129 |
|
Resume
¶
Bases: BaseEvent
The bot has resumed its connection to the discord Gateway.
Source code in interactions/api/events/internal.py
85 86 87 |
|
Select
¶
Bases: Component
Dispatched when a user uses a Select.
Source code in interactions/api/events/internal.py
151 152 153 |
|
ShardConnect
¶
Bases: Connect
A shard just connected to the discord Gateway.
Source code in interactions/api/events/internal.py
95 96 97 98 99 |
|
ShardDisconnect
¶
Bases: Disconnect
A shard just disconnected.
Source code in interactions/api/events/internal.py
102 103 104 105 106 |
|
Startup
¶
Bases: BaseEvent
The client is now ready for the first time.
Use this for tasks you want to do upon login, instead of ready, as this will only be called once.
Source code in interactions/api/events/internal.py
109 110 111 112 113 114 115 116 117 |
|
WebsocketReady
¶
Bases: RawGatewayEvent
The gateway has reported that it is ready.
Source code in interactions/api/events/internal.py
132 133 134 135 136 |
|