ctx.author.voice
- это VoiceState
автора, который имеет атрибут channel
, представляющий VoiceChannel
, в котором находится член:
if ctx.author.voice and ctx.author.voice.channel:
channel = ctx.author.voice.channel
else:
await ctx.send("You are not connected to a voice channel")
return