首页 > 解决方案 > 让我的机器人加入发送命令的人,而不是让它在预设的 VC 中

问题描述

我的代码目前是这个

voiceChannel = discord.utils.get(ctx.guild.voice_channels, name='Music')
await voiceChannel.connect()

我该如何更改它以加入作者而不是加入标有“音乐”的 VC

标签: pythondiscord.py

解决方案


如果您在此之后需要更多帮助,请考虑加入这个小型不和谐服务器

这是我用于我的代码:

@bot.command()
async def join(ctx):
    author = ctx.message.author
    channel = author.voice_channel
    await bot.join_voice_channel(channel)

推荐阅读