-
Hi, I'm working on a bot that will join a voice channel and play a short sound byte whenever a non bot user enters a channel. The bot does join the channel and stays there for the length of the sound byte, however it does not produce any sound. Here is my code:
Here is what I've tried so far:
Any suggestions as to what else I could check? Im sure I missed something, but not sure what it could be |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I am not 100% sure if this is the solution to your problems but it could be. At least blocking the bot for the duration of the audio file should not happen. Otherwise try to update to the current git version since there have been a few fixes related to voice functionality added to master which aren't in the latest release yet
|
Beta Was this translation helpful? Give feedback.
time.sleep(1)
ever in your bot. Discord.py is an async library and therefore if you need to wait something useawait asyncio.sleep()
instead See hereafter
keyworded argument that will call a function upon completion of the file. You could do the disconnect in theafter
function. See here for how to do it with an async functionI am not 100% sure if this is the solution to your problems but it could be. At least blocking the bot for the duration of the audio file should not happen. Otherwise try to update to the current git version since there have been a few fixes related to voice functionality added to master which aren't…