About TimeoutNegativeWarning

recently my bot keep getting this warning when using @discordjs/voice
(node:7384) TimeoutNegativeWarning: -17 is a negative number.
Timeout duration was set to 1.
at new Timeout (node:internal/timers:195:17)
at setTimeout (node:timers:163:19)
at prepareNextAudioFrame (D:\project-development\rikai-discordbot\node_modules\@discordjs\voice\dist\index.js:130:28)
at Immediate.<anonymous> (D:\project-development\rikai-discordbot\node_modules\@discordjs\voice\dist\index.js:135:22)
at process.processImmediate (node:internal/timers:508:21)
(node:7384) TimeoutNegativeWarning: -17 is a negative number.
Timeout duration was set to 1.
at new Timeout (node:internal/timers:195:17)
at setTimeout (node:timers:163:19)
at prepareNextAudioFrame (D:\project-development\rikai-discordbot\node_modules\@discordjs\voice\dist\index.js:130:28)
at Immediate.<anonymous> (D:\project-development\rikai-discordbot\node_modules\@discordjs\voice\dist\index.js:135:22)
at process.processImmediate (node:internal/timers:508:21)
it's not an error, but when that warning is present, any audio activities randomly got freeze(?) for seconds and then proceed to continue playing the audio in 2x speed and back to normal speed eventually what i tried : 1. adding a padding frame to the stream process 2. custom timeout before streaming the audio i want to know if this is known issue?
1 Reply
d.js toolkit
d.js toolkit•5mo ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!

Did you find this page helpful?