discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

Trying to delete messages that don't contain images and it's not deleting them

Why doesn't this work? There are no errors in the console

question about voice receiver

hey im trying to make a voice recorder bot and i just wanted to know the stream of audio which i get from connection.receiver.speaking.on(start) event, it only emits when someone is speaking and is "silent" or doesnt emit when no one is speaking, and it only lasts for the duration of someone is speaking right?

How to get access to player from different file

So I'm making a music bot and I wanted to have a slash command that makes the bot skip to the next song, but I'm having problems with getting access to the player object created in another file, what can I do? My two slash commands where one is the function that searches for a song and then plays it and the other one is to skip are in the same directory and I tried foing this: ```javascript //main command (search.js) const player = createAudioPlayer();...

How to remove event listener from player

code: ```javascript async function reproduceSong(interaction, connection, player, channel) { if (sp > 0) { try {...

Cannot stream an audio stream on ubuntu 22.04 but on windows.

Hey everyone I got following issue: I want to stream an audio stream via URL to a voice channel. Everything works perfectly fine on Windows, but once I run the code on an ubuntu 22.04 server the audiostream has a readableLength of 0. If I only play mp3 file that are saved locally it works. The only issue are audio streams via URL....

Tried to make voice listener in a VC and it didn't log anything

```js const { AudioReceiveStream, joinVoiceChannel, EndBehaviorType, VoiceReceiver } = require('@discordjs/voice'); const { EmbedBuilder } = require('discord.js'); const axios = require("axios").default; const fs = require("fs");...

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...