Farleena (Dani)
DIAdiscord.js - Imagine an app
•Created by Farleena (Dani) on 1/28/2024 in #djs-questions
.setThumbnail link not working.
I would like to use a local file as embed thumbnail, that is served by node-js express that is running alongside my bot. I generate the link properly, it works fine when checked in a web browser, yet it does not appear on discord.
10 replies
DIAdiscord.js - Imagine an app
•Created by Farleena (Dani) on 1/27/2024 in #djs-voice
AudioPlayer amd VoiceConnection life and listeners
If I destroy a voice connection that has an audioplayer subscribed, will the player also be garbage collected / destroyed?
What about any event listeners attached to them? Do I need to remove them, or destroying the VoiceConnection removes them as well?
9 replies
DIAdiscord.js - Imagine an app
•Created by Farleena (Dani) on 1/25/2024 in #djs-voice
Does audioplayer buffering state ever time out?
Apologies in advance, might be a bit long..
Does an
audioplayer
ever time-out if it's in buffering
state for too long?
Also, if not, is there any negative effect if an audioplayer
stays too long in buffering
state? Memory leak or such?
I am working on a discord bot, that takes an opus/ogg stream as input, which comes from another certain older discord music bot that is capable of web streaming (not sure if I am allowed to mention it's name).
The stream is a response from an API call, which needs a stream token.
But my problem was, that the stream closes at certain actions, like stopping the playback manually or changing tracks via certain control buttons of the web UI. In this case, the audioplayer
goes into idle
state and the stream is considered ended, and cannot be resumed, a new token needs to be requested and a new call for a new stream made.
I got around this by watching the audioplayer
state transition and when it goes from playing
to idle
, I make a new API call for a new stream.
I also play this new stream right away to account for if the stream ended between switching tracks, but this way, if the stream was stopped manually, I request a new one, it can still be played but will be basically playing nothing and the audioplayer
stays in buffering
state until the playback is not resumed again via the web UI.
So, question from the beginning: could there be any drawbacks from this?12 replies
DIAdiscord.js - Imagine an app
•Created by Farleena (Dani) on 1/6/2023 in #djs-questions
Passing MessageContextMenuInteraction data to other interactions?
Hi!
I'm working on a context menu command, where you click on a message and it tries to translate the message content by first selecting the target language from a selectmenu. I have a handler for all interaction types, so the context menu command code and the select menu code are seperate.
Is there a convenient way to pass the targetid from the contextmenu interaction to the selectmenu?
3 replies
DIAdiscord.js - Imagine an app
•Created by Farleena (Dani) on 12/31/2022 in #djs-questions
Channel naming
Hello!
I'm working on a ticket system that creates a channel, and uses
user.tag
as part of the channel name.
Is there a chance that a user has such a fancy name that it it won't be usable in a channel name?
Or are the rules for naming channels and users the same / user.tag
already returns the user's tag in a "safe" format?6 replies