How to detect being disconnected by a mod? #71
-
Right now I have some cleanup code in my disconnect command (that clears the song queue for example), but I also want to execute it when a mod presses rightclick and disconnects the bot from the channel. How do I hook up an event handler to this? I found CoreEvent but it doesn't seem that there even exists a disconnect event - unless the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently we don't have an event type for this, but it should be a doable (non-breaking) addition. I think in the meantime, your best option is to listen into (assuming you're on serenity) |
Beta Was this translation helpful? Give feedback.
Currently we don't have an event type for this, but it should be a doable (non-breaking) addition. I think in the meantime, your best option is to listen into (assuming you're on serenity)
VoiceStateUpdate
s—an update with your bot'sUserId
andNone
for itschannel_id
is the relevant trigger.