我正试着用一些语音命令编写一个不和谐的机器人。其中一个工作正常:
async def padoru(ctx):
if not bot.is_voice_connected(ctx.message.server):
vc = await bot.join_voice_channel(ctx.message.author.voice_channel)
else:
await vc.move_to(ctx.message.author.voice_channel)
player = vc.create_ffmpeg_player('padoru.mp3',after=lambda:print("padoru started"))
player.start()
while not player.is_done():
pass
await vc.disconnect()
而另一个会使机器人崩溃(在播放歌曲一段时间后):
^{pr2}$崩溃不会真正打印任何内容,机器人只是停止响应任何命令以及停止语音命令本身。在
目前没有回答
相关问题 更多 >
编程相关推荐