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

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buff

```js const con = joinVoiceChannel({ channelId: interaction.member.voice.channel.id, guildId: interaction.guild.id, adapterCreator: interaction.guild.voiceAdapterCreator,...

How to make the bot leave a voice chat?

I have tried several options: ```js let connection = getVoiceConnection(interaction.guild.id); if (connection === undefined) { await interaction.reply("I am not in a vc!");...

ETIMEDOUT Exception Error (voice server connection issue)

Hi there, I have this problem that occurs randomly and caused my entire bot to crash. I'm looking for ways to either prevent this issue or handle it so it doesn't cause a complete bot crash. Just to be clear, I don't have any issues with my bot connection to voice channels or anything like that, this error just occurs randomly. Any help is greatly appreciated. The blurred part is an IPV6 IP (most likely the voice server IP)....
No description

Play Sound from URL

Hi, ive created a command to have the bot on a voice channel, it works but i want to play a sound from an url but i dont realy know how to do this, i found some infos on the web about playing an audio from a file but not from a link

Music bot autopause

Info: I am running this locally using node index.js. I have given the bot admin permission. I have added the GuildVoiceStates to the GatewayIntentBits. I have checked all 3 of the Privileged Gateway Intents found in the discord portal....

cannot hear my bot

Hi. I found my old "play-mp3" command. However, when I tried it out it didn't play any audio. The code doesn't throw any errors. Now I have no idea whether it's me or the bot. ```js const { SlashCommandBuilder } = require('@discordjs/builders'); const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice'); const { ChannelType, EmbedBuilder } = require('discord.js');...

STT

I would like to make a bot that listen to voice orders. Any idea how to ?...

Relay audio from a channel to another

Hi, i'm creating a bot with discord.js v14 that has to relay the voice of an user in a channel to another channel in another server, i can't figure out how to play the stream from connection.receiver.subscribe(userID).

Help with discord js voice

```js arsb!ceval let mod = require("@discordjs/voice") let player = mod.createAudioPlayer(); console.log(player) mod.joinVoiceChannel({channelId: "1079420517523669133", guildId: message.guild.id, adapterCreator: message.guild.voiceAdapterCreator}).subscribe(player)...

how to fix error "Cannot performIP discovery socket closed"

Hello, I am getting the error below when connecting to a voice channel for a while. I don't know if there is any way to fix it? ```js Unhandled promise rejection: Error: Cannot perform IP discovery socket closed...

Player Auto-Pause

I have this music bot and I want it to pause the playback if it's alone in the voice channel. I've succeeded in doing that, but rn it pauses instantly after detecting that it's alone and I want it to wait for 3 seconds before doing that, so that if anybody joins during that time interval the bot doesn't need to pause. here's the code currently: ```js client.on('voiceStateUpdate', (oldState, newState) => {...

TTS

i want to create a simple discord bot, that will read user messages in specific channel and bot will use TTS in voice channel to read user message. so basically if user joins - bot joins also and should play TTS with the message. but it doesnt work for me - bot joins after sending a message but its not playing TTS. any ideas? Code:...

Automatically join voice channel

when user click the text(see the attached image), should automatically join the voice channel Thank a lot...
No description

@discordjs/opus is not installing

I tried sudo, reinstalling node and readding discord.js to my package.json, nothing works, I am using the latest node js, npm, and latest discordjs version

Help with audio stream.

Im trying to make a bot which would capture the incoming audio from a voice channel and play it back in realtime, how can i do this?, i tried doing this but it didnt work ```js receiver.speaking.on("start", (userId) => { const opusStream = receiver.subscribe(userId, {...

doubt about voice status

whenever i create a connection with joinVoiceChannel why is the stauts sometimes "signalling" and sometimes "disconnected"

doubts about joinVoiceChannel

hey so i have a server which hosts multiple bots at the same time and if i want to specifically use joinVoiceChannel function on one of the bots which is running how can i do that?, is there any way to specify the client object which i want the function to use

i can't install @discordjs/opus

I try to install @discordjs/opus but i have this error Nodejs version : / 20.8.0 Windows 64 Bit Python 3.12 Discord.js version : 14.13.0...

ffmpeg EAGAIN

``` 23-10-2023 22:35:54 A: Error: spawn /home/container/node_modules/ffmpeg-static/ffmpeg EAGAIN at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {...