Manicraft1001
Manicraft1001
Explore posts from servers
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Also, I didn't find <AudioPlayer>.state.playbackDuration with TS. But the other one works
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Can confirm that this works. Why is this not in the documentation? 😄 I think it should be included here: https://discordjs.guide/voice/audio-resources.html#cheat-sheet
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Hmm okay, I will check those out. Thanks
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Any update on this?
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
-------- The only place, where I was able to find a decent looking solution, was here: https://github.com/adh319/Lunox/blob/e95ad3c4ef1d98c93bb4cd1273be1acc275dd912/src/commands/Slash/Music/Seek.js#L43 However, I don't fully understand where this function comes from or how it works.
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
I looked into this again, 1. I do not understand your sentence here: meant to be generic and to encompass most or all use cases to where the developer can tailor the experience, performance impact. Why should a library, made for playing music, not keep track of time? This seems like making a car and forgetting to produce the wheels. 2. I do not see a easy solution in the Volcano bot. It seems cumbersome and much boilerplate code. 3. The only solution, I have came up yet is, to read the time from the AudioResource, record an initial timestamp and keep track of this. Since pauses or potential steam lags could break this, I would have to implement all edge cases to record the timestamps and store them in a list. Then, I would have to calculate the elapsed time from the list. I know that this can be done, but this implementation screams for inaccurate measurements. I do not see any value in abstracting the elapsed time. Why would discord.js do that? I fully understand, that things like currentTrack would not make sense to be implemented in discord.js, as this would not be generic and abstracted, but the elapsed time seems like a huge oversight to me? Apparently V12 (or V13) had a dispatcher, that stored the (accurate) elapsed time. I did a search, if there was any replacement for this in V14, but seems like it was just blindly removed. I understand, that the goal is to keep things modular and generic, but this seems like an incomplete solution? I searched through the majority of projects on GitHub, that have the discord.js tag, and most seem to stay on an older version for this exact reason. If the goal is, to keep things generic, why not make a new library that integrates with the existing ones? Funnily the docs also never state anything about seeking or elapsed time, which is an essential feature in my opinion. PS: I don't blame anyone specific. Not exposing this information seems like a huge anti-experience thing to do to me.
18 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"
I mentioned the issue from my repo, thanks. I'll see if I can gather data with the user so we can finally resolve this
4 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Thank you, I'll have a look at it 👍
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
Does that really give the elapsed time? Sounds like it will just always give 1, when both playback duration and resource time is the same value. If not, what do those individual values mean? Also, do you know why the previous behaviour has been removed? This just seems unnecessary when there's a simpler way
18 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Manicraft1001 on 12/25/2022 in #djs-voice
Elapsed audio resource duration
18 replies