This repository was archived by the owner on Apr 5, 2025. It is now read-only.
Commit 2a41e1b
authored
Fix player destroyed after voice moved
When the bot moves channels, the player was being destroyed because the disconnect wait did not account for
the brief period between disconnect and reconnect. This commit modifies `_disconnected_wait` to wait for the
_reconnecting event and then verifies the current voice state via `guild.me.voice.channel`. If a valid channel
is detected, the connection is restored without calling `_destroy()`. This prevents accidental player deletion
during channel moves.1 parent 23f28e1 commit 2a41e1b
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
186 | 196 | | |
187 | | - | |
| 197 | + | |
188 | 198 | | |
189 | 199 | | |
190 | 200 | | |
| |||
0 commit comments