Discord music bot NoneType对象没有属性“play”

2024-05-14 06:15:37 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的密码:

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: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'play'


Tags: lambda密码sourceplaysongmp3printvoice