Better way to detect the bot being disconnected? #2535
-
Currently I have a listener for onGuildVoiceUpdate that checks if the action was the bot leaving a channel, and then pulls the audit logs to check if someone was disconnected within 1 second either side of the action happening, but this has some issues and I'm sure there is a better method that I am just missing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
With disconnected, do you mean kicked from the channel by a moderator? Or the bot leaving like What are you trying to achieve exactly? Reconnecting if the bot did not initiate a disconnect itself? |
Beta Was this translation helpful? Give feedback.
Not directly, no. However, you can also listen for the GuildAuditLogEntryCreateEvent.