Check if person is in a voice channel discordpy

The issue is here:

voice_channel = ctx.author.voice.channel
    if voice_channel is not None:

Member.voice returns None when the member is not in a voice channel, so you should check that first.

voice_state = ctx.author.voice
if voice is not None:
    ....

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top