TypeError: source must an AudioSource not NoneType #6071
-
I'm attempting to get a bot to play audio in a voice channel, this is the code I have for it. @bot.command(pass_context=True)
And it works until about somewhere in here: for file in os.listdir('./'):
Then it sends this error. Ignoring exception in command play: The above exception was the direct cause of the following exception: Traceback (most recent call last): I cant figure out why it's displaying said error Win 10, py 3.8.6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Your traceback would seem to indicate that you're passing For code block usage, see https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-and-highlighting-code-blocks. |
Beta Was this translation helpful? Give feedback.
Your traceback would seem to indicate that you're passing
None
tovoice.play
, but attempting to accessdiscord.ffmpegPCMaudio
itself should error, as the class isFFmpegPCMAudio
.For code block usage, see https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-and-highlighting-code-blocks.