【发布时间】:2020-12-11 04:42:34
【问题描述】:
我正在制作一个不和谐的机器人,只是为了玩 python。我尝试通过命令将人们转移到特定频道,但它不起作用。有人知道这是如何工作的吗?这是我的代码:
@bot.command()
async def move(ctx, user : discord.Member, channelname):
channel = discord.utils.get(ctx.guild.channels, name=channelname)
channel_id = channel.id
user_id = user.id
channel = client.get_channel(channel_id)
member = client.get_member(user_id)
await member.move_to(channel)
【问题讨论】:
标签: python discord discord.py