这是我的代码:
voice.play(discord.FFmpegPCMAudio("song.mp3"), after=lambda e: print("Song done!"))
voice.source = discord.PCMVolumeTransformer(voice.source)
voice.source.volume = 0.07
我收到此错误:
discord.ext.commands.errors.CommandInvokeError:命令引发了 异常:AttributeError:'NoneType'对象没有属性'play'
答案 0 :(得分:0)
这意味着声音为无...
您尝试连接到频道吗? 您是否在与该频道相同的公会中执行命令?
https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild.voice_channels https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild.voice_client