DIA
discord.js - Imagine an appMatheson
URL Audio Resource Streaming Stopped Working
idk whats going on so maybe one of you can help... my bot has been broken for a few months I thought it was broken because of the URL changes but no URL seems to work only local files
it says it started playing and immediately stops
I don't hear anything though
DT
d.js toolkit•92d ago
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!M
Matheson•92d ago
it seems like the bot gives up immediately when the audio player enters the buffer state
My work run for now is to use axios to download the file before playback to a temp dir and then it plays perfectly fine every single time
T
ThePedroo•91d ago
The code, please
M
Matheson•91d ago
I have the code with the workarround but I can write a simplified new bot demonstrating the issue
it just seems to happen with the URL as a resource... something that used to work
T
ThePedroo•91d ago
I had an issue that for some reason streams would abort randomly on URL
& FFmpeg give errors
So my fix was to create a PassThrough stream
Manually write & end & handle errors
And pass that stream to djs
In the case of https only, making a https.get and passing the req/res worked
M
Matheson•89d ago
I used to be able to pass the URL directly to create audio resource before version 16
T
ThePedroo•89d ago
Ehh, passing streams is more reliable
✨𝓜𝓪𝓲𝓽𝓻𝓮𝓖𝓔𝓔𝓚ツ✨•62d ago
Working for me thanks :maitre38Poutiblagueur:
T
ThePedroo•62d ago
:blobguns:
✨𝓜𝓪𝓲𝓽𝓻𝓮𝓖𝓔𝓔𝓚ツ✨•62d ago
:maitre38Leocheers:
T
ThePedroo•62d ago
I am unsure why this happens, may be something to their internal code
✨𝓜𝓪𝓲𝓽𝓻𝓮𝓖𝓔𝓔𝓚ツ✨•62d ago
Yeah that's what I thought because that's happening only on linux, on windows that works perfectly fine
T
ThePedroo•62d ago
True? Weird (I don't use Windows, so never saw it working)
Well, this is a good workaround at least
✨𝓜𝓪𝓲𝓽𝓻𝓮𝓖𝓔𝓔𝓚ツ✨•61d ago
Yep
Support server for discord.js, a Node.js module to interact with the Discord bot API.
58KMembers
View on DiscordWant results from more Discord servers?
More PostsHow to make an autocomplete list from mongodb entriesSo I have an array of objects, i want to display the name field of each object in a list, and then oSend message to specific channelHow can I send a message to a specific channel of my guild?Ticket SupportWhy when i run the bot, the terminal gave me this error?Can someone help to complete this command?I have a ticket command here, but I don't know how to make a channel that opens from a button:Webhook send channelId optionIs it possible to parse a channel ID on the webhook.send method for it to send to a thread rather thIssue with Select MenuHello, I'm new with select menus, I tried them today but the bot isn't responding to them. The consoinvalid from body```DiscordAPIError[50035]: Invalid Form Body
14.options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]invalid from body```DiscordAPIError[50035]: Invalid Form Body
14.options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]LatencyAfter I created shards for bot, latency went from 8-10 to 200 and this happens sometimesmodal submit unknown interaction```js
await interaction.showModal(modal); //ButtonInteraction
const filter = (i) =>
MODALhey, how can add textlabel in modal please?Add points to multiple users at onceI want to make 3 optional options to add points to multiple users at once, How can I achieve that wiAuthentication failed at WebSocketShard.onCloseI get this error once every few weeks and discord resets my bot's token.
```Unhandled rejection: AutFor some reason my collecter won't work?It doesn't give me an error or anything and ive been debugging for about 6 hours now. Any pointers aEmbed is only sending once every time the slash command is ran every active sessionBy every active session I mean every time the bot is online.
I have a slash command that is like anDownload Node JS without admin rightsHello i want to know if it's possible to install node js npm without admin rights please403 Error due to new image expiration?Hey all, I'm unfortunately having issues with a ticket transcript system that I created for my discoGetting: Invalid bitfield flag or number: VIEW_CHANNEL. (creating a text channel)dont rlly know.
code:
```js
collector.on('collect', async(i) => {
const selectioAnonymous bot sub-users (PluralKit)How would I create anonymous bot sub users like what PluralKit and similar bots do?
The users are mslash commandshow can creat slash command with open popup(modal) ? pls