Manicraft1001
Explore posts from serversDIAdiscord.js - Imagine a boo! 👻
•Created by Manicraft1001 on 10/16/2024 in #djs-voice
AudioPlayer goes from buffering -> playing -> idle and warns that resource is not playable
Hi,
I have troubles for the last months with playback of resources.
The source is available at https://github.com/manuel-rw/jellyfin-discord-music-bot
Even though the stream URL seems correct to me, the bot goes into
idle
after a few milliseconds and it stays silent in Discord.
I have tried different variations of the stream URL but they dont' seem to change anything. It used to work fine - I did not make an update of discord.js in the mean time.
The code playing for resources is distributed, but let me summarise it shortly:
All relevant code in discord.voice.service.ts
Log: https://pastebin.com/ZGyrYzmQ
I already added tons of debugging branches & log statements to troubleshoot.
Do you have suggestions for the next steps? How can I troubleshoot resources that can't be played?
Also, the docs don't go into much detail why resources aren't "playable".
I read the following pages and could not find further steps / ideas: https://discordjs.guide/voice/audio-resources.html#cheat-sheet, https://discord.js.org/docs/packages/voice/0.13.0/AudioPlayer:Class#checkPlayable
Node: v20.13.1
Crosspost from #djs-questions , wrong channel. Sorry.2 replies
DIAdiscord.js - Imagine a boo! 👻
•Created by Manicraft1001 on 1/24/2023 in #djs-questions
What are possible causes for "DiscordAPIError[10062]: Unknown interaction"
Hello 👋
A user of my bot reported that they are getting the following error:
I instantly expected that Discord was probably not happy with the response time, since the action may take some while.
So I refactored to use
await deferReply()
.
This works for me, but the users still has the same error.
We already debugged everything around and concluded, that await deferReply()
just under a second.
deferReply does not seem to be the issue. I call it correctly.
This issue has already been reported once, but the thread was locked:
https://github.com/discordjs/discord.js/issues/7005
Thus, I decided to ask here, what other possible issues besides the timeout, could cause this issue.
I'm happy to provide the source code, but I sadly can't reproduce the error on my machine.
I can provide the code, but as the issue already says, the code does not seem to be the problem here.
4 replies
DIAdiscord.js - Imagine a boo! 👻
•Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Hello everyone,
I'm currently trying to implement a proper progress bar which displays the playback of the current song.
According to a few questions online, it seems like discord.js used to have a
streamTime
property. It looks like this has been removed for some reason in the next release.
- Why has this been removed?
- Is there any replacement or other way to get the current position in millis? I saw https://discord.js.org/#/docs/voice/main/class/AudioResource?scrollTo=playbackDuration, but this seems to be something different.
I am playing the resource using this method:
https://github.com/manuel-rw/jellyfin-discord-music-bot/blob/92021dd94e824af91a559d161df11b2898812595/src/clients/discord/discord.voice.service.ts#L8718 replies