【发布时间】:2019-09-20 03:32:40
【问题描述】:
试图让我的不和谐机器人将用户移动到消息作者所在的语音频道。例如我写!move @john 然后机器人会将“john”移动到我的语音频道。
# command to move a user to current channel
@bot.command()
async def move(ctx,member:discord.Member=None):
channel= discord.utils.get(ctx.guild.voice_channels)
if not member:
await ctx.send("Who am I trying to move? Use !move @user")
await member.move_to(channel)
目前它将用户移动到服务器中的第一个语音通道。怎样才能把它移到作者的语音频道?
【问题讨论】:
标签: python-3.x discord discord.py discord.py-rewrite