我想让我的不和谐机器人连接到我输入的语音频道!join。我曾尝试使用以下代码执行此操作,但出现此错误:
bot: BotInstance of 'Bot' has no 'voice_client_int' memberpylint(no-member)
我发现我的代码与 rewrite discord 版本不兼容。
@bot.command(pass_context = True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await bot.join_voice_channel(channel)
@bot.command(pass_context = True)
async def leave(ctx):
server = ctx.message.server
voice_client = bot.voice_client_int(server)
await voice_client.disconnect()
Run Code Online (Sandbox Code Playgroud)
有人能帮我吗?