Answer the question
In order to leave comments, you need to log in
When a participant is mentioned in the !vmute command, if he is in the voice channel of the discord, he should be transferred to another channel, how to do this?
My code:
@commands.command(aliases=['Vmute', 'вмут', 'Вмут', 'vmut', 'вмуте', 'вЗамутить', 'взамутить', 'вМутить', 'вмутить'])
@commands.has_permissions(kick_members = True)
async def vmute(self,ctx, member: discord.Member, duration = None, *, reason = None, channel='id=︱Loading...'):
channel = discord.utils.get(ctx.message.guild.voice_channels, name='︱Loading...')
mute_role3 = discord.utils.get(ctx.message.guild.roles, id = 847783493160796181)
if ctx.member in ctx.guild.voice.channel:
await member.move_to(channel)
Answer the question
In order to leave comments, you need to log in
channel = discord.utils.get(_ctx.message.guild.voice_channels, id = id)
for i in ctx.guild.voicechannels:
await member.moveto(channel)
Well like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question