show user connecting on the visible voice channels

This commit is contained in:
deflax 2022-03-23 22:18:31 -04:00
parent 2feffba344
commit 31a72b727e

View file

@ -56,8 +56,8 @@ async def on_message(message):
@bot.event @bot.event
async def on_voice_state_update(member, before, after): async def on_voice_state_update(member, before, after):
print("User connected to " + str(after.channel.id)) print("User noticed on " + str(after.channel.id))
if after.channel.id == [voice_channel_id]: if str(after.channel.id) == voice_channel_id:
clients_before = len(before.channel.members) clients_before = len(before.channel.members)
# If nobody in the channel based on before, invoke join the channel # If nobody in the channel based on before, invoke join the channel