Status
Warning
Prerequisites:
Any code from the prerequisites can be omitted to make it easier to read. If you do want the complete code, look at the repository examples.
Note
This refers to the status of the internal websocket that the SDK uses to communicate with Discord.
Do not confuse this with the user status (online, offline, busy, ...).
Monitoring the status of your connection with the Discord is important because some Discord methods only works when the status is READY.
Running the following code will not provide any output (even if you setup logging) because your status start as DISCONNECTED and only change when you attempt to connect to Discord, which we will cover in Account Linking.
| GDScript | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |