discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.33k stars 736 forks source link

How to differentiate between a disconnect and move? #1596

Closed sda3-14 closed 3 years ago

sda3-14 commented 3 years ago

General Troubleshooting

Question

I am trying to write a music bot, but I am unable to differentiate between someone disconnecting the bot and someone moving the bot. For both events, the connection status changes to DISCONNECTED_KICKED_FROM_CHANNEL. How do I check if it will reconnect to another channel or if it was kicked?

Andre601 commented 3 years ago

Please follow the issue template

DManstrator commented 3 years ago

You can use the GuildVoiceMoveEvent for that. It also mentions how a move is differentiated from a leave.

sda3-14 commented 3 years ago

You can use the GuildVoiceMoveEvent for that. It also mentions how a move is differentiated from a leave.

Okay, thanks!