discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

ytdl audioplayererror

Hi, im trying to update my application so my bot connect to a voice channel, and put a sound on it. I have this code :...

Unable to Hear Audio

https://pastebin.com/VZtMgbNE Howdy o/ Been following along with the Discord.JS v14 guide, but I seem to have stumbled somewhere on trying to implement a quick sound effect. I've put dependencies and such in the pastebin, but overall I believe that what I've got should be pretty similar to the guide, so I don't know what's gone wrong. GuildVoiceStates has been included in the intents, and relevant libraries should also be here. ...

Discord wierd script

Helloo, i want to make this bot : A bot who join my vocal, who records what I say and when I stop talking, he leaves and send me the mp3 file, after that, he joins again and speak this mp3...

Hey, my bot plays audio locally but I can’t hear it in Discord help?

Hi everyone! I’m working on a Discord bot called DMortal1 using @discordjs/voice, and I’m stuck on an issue where the bot seems to play audio fine on my end (logs say it’s working), but I can’t hear anything in the voice channel. There’s also a yellow "User maybe having trouble connecting to the call" warning next to the bot in Discord. I’ve been trying to troubleshoot this for a while and could really use some advice! Here’s what’s going on: - I’m running Node.js v22.14.0 on Windows, and the bot is hosted on my PC (IP: 192.168.4.29)....

Slash commands

I'm new on discord.js server and i want to knoe hot to create slash commands using that library?

streaming from url

does anyone have code for a bot that streams sounds from given url (/live)

Discord voice doesn't play remote audio on linux

I have a weird behavior where playing audio from an URL works on my windows PC, but doesn't on my linux server. Basically I'm trying to play audio from this url: https://cdn.communitydragon.org/15.4.1/champion/gnar/champ-select/sounds/choose ...

How to use setTransportOptions to set voice bitrate, and 2 channel stereo

There has been a recent update to discord in which updateVideoQuality has stopped working as a way to hook, and setTransportOptions for audio channels and bitrate. I tried to look for what new function replaced it so I can write a new plugin to replace the one I use to play live music over voice chat on discord.... However, I can't find setTransportOptions in any webpack module or find out how to call it..... It is referenced in the index.js that can be found within the discord_voice module folder. Can someone please help me find what replaced this functionality????...

Decoding Opus packets from `AudioReceiveStream` using @discordjs/opus

I have a problem with decoding Opus packets received from AudioReceiveStream using OpusEncoder from @discordjs/opus. When I try to save decoded samples and play them, every player says they are corrupted. I know provided example is using prism-media for that, but this would be an overkill for me....

Audio player suddenly ends.

Audio.ts code: https://pastebin.com/WJ3TvyVc Files: picture Error: ``` 2025-02-13T16:55:53.365Z | TypeError: Cannot read properties of undefined (reading 'ended')...
No description

Player plays fine using string but not via createReadStream

No error is thrown either. Report: ``` Core Dependencies - @discordjs/voice: 0.18.0...

Errors compiling discordjs/opus for ARM64 with gcc14

Is anyone else able to compile the opus bindings for ARM64 with gcc14? Getting the following gyp error: ```js npm error ../deps/opus/celt/arm/celt_neon_intr.c: In function 'celt_pitch_xcorr_float_neon': npm error ../deps/opus/celt/arm/celt_neon_intr.c:208:18: error: implicit declaration of function 'celt_inner_prod_neon'; did you mean 'celt_inner_prod_c'? [-Wimplicit-function-declaration]...

Player State = idle

Why does the track ends automatically after some time of starting. It's a live stream url. It plays fine for few secs/mins then track ends usually like idle....

No audio on Windows 11 when playing mp3 file

(following the official guide in https://discordjs.guide/voice/audio-resources.html) I was setting a simple command for playing an .mp3 file (readed that FFmpeg can handle it), but no sound is heard in the voice channel. The bot can join the channel without any errors and load the file, but it 'pauses' the music the instant it joins. I also tried with other file types like Ogg or the recommended Opus versions. Nothing worked. I made all the code in the command file (i thought it was okay and didnt require to made changes to the main.js file). The bot has admin permissions just in case....

RangeError: offset is out of bounds [@discordjs/opus]

Gathering a RangeError when attempting to play a shoutcast live stream [AUDIO ONLY], the bot has been playing stations like a charm for the past 7 months with no issue and recently arised, not sure what happened and even checked via ffmpeg stats and attempted to see the connection but it looks the same, 48000hz. Looks like its for buffering although not sure what the functionality behind it does at all in order to attempt to manually fix it. ```js [ UNCAUGHT EXCEPTION ] → RangeError: offset is out of bounds at Uint16Array.set (<anonymous>)...
No description

Inline Volume not working after starting to play the resource

Hey, I have a problem. The inline volume seems to not work after playing the resource. It was working before but now it doesn't work anymore. Here's the code : ...

Am I missing something completely?

Bot will join voice channel but wont play music. ```js const { SlashCommandBuilder,...

No audio on Ubuntu 24.04

Hey everyone. I Have installed the newest versions avaliable basically and ubuntu does not like npm install @discordjs/opus no idea what i missing.

No music playback on arch linux.

Hey I'm on a arch linux pc, and when I try to do playback of an url the bot just joins the voice channel, goes into Playing Status, and after like 100ms it goes back to idle. The thing is the exact same code works perfectly fine on my debian server. I tried searching in the web and also asked GPT, but after 3 hours of no result I'm asking here....

Trying to make my bot play .mp3 for directory

Hi ! My bot is successfuly doing everything exept playing any sound : If anyone have an idea .. 🙂...
Next