Summary
on_voice_state_update fires twice when the bot moves between voice channels
Reproduction Steps
- The bot connects to voice channel
voice 1
- I manually move it to another voice channel
voice 2
- Then I manually move it back to
voice 1
Minimal Reproducible Code
@bot.event
async def on_voice_state_update(member: discord.Member, before: discord.VoiceState, after: discord.VoiceState):
if before.channel and after.channel and before.channel != after.channel:
print(f"{member.nick} entered another channel")
return
if before.channel and after.channel is None:
print(f"{member.nick} has left the voice channel")
Expected Results
Bot entered another channel
Bot entered another channel
Actual Results
Bot entered another channel
Bot entered another channel
Bot has left the voice channel
Intents
All
System Information
- Python v3.10.10-final
- py-cord v2.7.1-final
- aiohttp v3.10.8
- system info: Windows 10 10.0.26200
Checklist
Additional Context
The issue only occurs when interacting with a bot. If you move a regular user, everything works correctly.
Summary
on_voice_state_update fires twice when the bot moves between voice channels
Reproduction Steps
voice 1voice 2voice 1Minimal Reproducible Code
Expected Results
Actual Results
Intents
All
System Information
Checklist
Additional Context
The issue only occurs when interacting with a bot. If you move a regular user, everything works correctly.