相关疑难解决方法(0)

不和谐机器人如何在不和谐重写中加入语音频道?

我想让我的不和谐机器人连接到我输入的语音频道!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)

有人能帮我吗?

python discord discord.py discord.py-rewrite

3
推荐指数
1
解决办法
4万
查看次数

标签 统计

discord ×1

discord.py ×1

discord.py-rewrite ×1

python ×1