discord.js - Imagine a 👻

DIA

discord.js - Imagine a 👻

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

Join

djs-questions

djs-voice

mp3

hello i have a mp3 file how to make the bot play that file ?

help

can anyone help me ?
No description

piping from udp stream into an audio resource

hello! i've been trying to write a bot to pipe desktop audio to a discord bot over udp (i use linux so this is my jank workaround to not having screen share audio), and i've settled on using dgram to open a udp socket and running ffmpeg locally to push to it (the full command is ffmpeg -f pulse -i default -f opus "udp://127.0.0.1:3756", and the local ip is fine for now since both the stream and bot are running on the same machine).

i so i need a muisc slash command and i need it to wrck i can give my code but it dos not wrck

if you can fix pls tell me code const { SlashCommandBuilder } = require('@discordjs/builders'); const { joinVoiceChannel, createAudioPlayer, createAudioResource, AudioPlayerStatus } = require('@discordjs/voice'); const ytdl = require('ytdl-core'); const command = {...

music command

How to make I try but it doesn’t work

Auto stop music in between

song auto stop while playing song and it stop before song over

its not allowing me to use it

Error: Cannot find module 'C:\Users\ZribeDev\Documents\Software\VoiceGuard\node_modules@discordjs\voice\dist\index.js' at createEsmNotFoundErr (node:internal/modules/cjs/loader:1181:15) at finalizeEsmResolution (node:internal/modules/cjs/loader:1169:15) at resolveExports (node:internal/modules/cjs/loader:591:14) at Module._findPath (node:internal/modules/cjs/loader:668:31)...

redirection voice from one channel of guild to another channel in another guild

My code now: ```js const connection = voiceData.connection; const channel = message.member.voice.channel...

Node.JS V20.X with Oups

Hi ! It's compatible with Node.JS v20.x ?...
No description

Bot doesn't stop playing

I'm trying to make a Music bot using spotify API but when i change the music the player doesn't stop and it plays the music after a while. The error is in the if statement but idk how to fix it :)) https://paste.learnspigot.com/ibefaduwod.js this is the current code i have now...

Discrepancy between .playable and .subscribers

Just curious to why this is. I've noticed that, after the bot has been running for some time, a discrepancy will manifest between these two lines of code. The expected behaviour is that both lines of code would output the same thing; the number of VoiceChannels that is playing/subscribed to a given AudioPlayer. ```js...

Problem installing @discordjs/opus on ubuntu 22.04

Hey, when i try to install opus package i got this error
No description

Forward audio

I guess @discord.js/voice don't have this functionality. I also didn't find on SO or Discord. Do you have plans to add? I know it's difficult because audio packets might have different formats. It's hard to detect I could edit the buffer and play again instead, but that seems like a workaround...

Bot doesn't stop playing if I try to change what it's playing

I use a slash command to obtain a keyword to search on youtube and it works, but if I try to use the command a second time it downloads the new audio but does not change to playing it immediatly, instead it continues playing the old track for around 10-20 seconds and then starts playing the new song. Code: ```javascript try { if (!interaction.options.getString("keyword")) interaction.reply("No prompt given");...

Bot connection state ready but sometimes i don't hear it

Hi sometimes my bot don't speak but the connection state is ready, rn i have a voice channel where i have this bug and can hotswap code, is there anything that i can send so we can debug that?

How do I fade audio out?

I have audio playing but I'm trying to fade it out instead of just having it immediately turn off

Problem with voice

Hi, I want to play music through a bot and I did it on my computer, but when I transfer files to the Ubuntu server, it does not work, through analysis I found that only the connection status will change, on the computer "ready", and on Ubuntu "signalling". There were no changes in the code, all dependencies are saved and have the same versions, discord js version 14.14.1. Can you help me with this problem?
No description

How really @discord.js/voice receives audio?

I looked up the source code, but I really have no idea how he's handling that. I'm thankful for any kind of reply. I want to implement audio receiving in Koe.

voiceAdapterCreator not working

can someone tell me why this is happening ```error adapterCreator: channel.guild.voiceAdapterCreator ^...