【发布时间】:2021-01-07 19:50:19
【问题描述】:
所以我创建了一个“命令”,它在写入时基本上是在播放音频文件。但我的问题是它给了我这样的错误:
raise ClientException('Already connected to a voice channel.')
discord.errors.ClientException: Already connected to a voice channel.
我的代码在这里:
if (".avocado") in content:
...
*bunch of code that doesn't effect the voice*
...
await message.channel.send((f"avocados from mexico: %d" %final))
channel = message.author.voice.channel
vc = await channel.connect()
vc.play(discord.FFmpegPCMAudio(executable="C:\Program Files\Python38\pffmpeg\pffmpeg.exe", source="avocados_from_mexico.mp3"))
voicest = 1
求任何帮助
【问题讨论】:
标签: python discord discord.py