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

How can I use opus to make my bot playing a specific mp3. in a voice channel with the command /play

I want to make a bot playing specific .mp3 in a voice channel, like that : /play {name of the mp3} and he play it

How to get the audioResource

I want to get the audioReasource to delete it, and i'm doing like this when it finish ```js const resource = createAudioResource(playObj.path); player.play(resource); ...

Problem installing @discordjs/opus on arch linux

I've got some problem installing discordjs/opus on my arch linux I will send the error in the morning...

system bot

how to create bot system

Shard Reconnection and Voice Connection

Will the voice connection automatically restart if a shard is asked to restart? I've been running into some problems where a shard has to restart and then the audio connection disconnects. Is there a way I can listen for this type of problem and have my bot reconnect when it happens? Or is it already supposed to be reconnecting and this is a bug?

Error streaming from IceCast server (Live Broadcast)

``` file:///home/syn/DungeonMaster/node_modules/@discordjs/voice/dist/index.mjs:1051 throw new Error("Cannot play a resource that has already ended."); ^ ...

how to repeat music once it's finished

Hi, once the music playback finishes the bot crashes and I get this error ``` throw new Error("Cannot play a resource that has already ended."); ^ ...

is there a way to send voice to specific members in channel simultaneously?

as in the title, I'm searching for any way to do that. I want to play different sounds for different members in the same channel and at the same time but I couldn't figure out a way. also, I tried making the bot able to join a private call with each member but it's impossible.

Error [ERR_STREAM_WRITE_AFTER_END]: write after end

This appears after about 2m of playing an mp3 file I have stored locally.
let editedSong = ffmpeg({ source: `./songCache/${id}.mp3` }).toFormat('mp3').setStartTime(Math.ceil(json.payloads[0].seek_to / 1000))
resource = createAudioResource(editedSong);
let editedSong = ffmpeg({ source: `./songCache/${id}.mp3` }).toFormat('mp3').setStartTime(Math.ceil(json.payloads[0].seek_to / 1000))
resource = createAudioResource(editedSong);
...

AudioPlayer not working, not sure what's wrong

```ts this._audioPlayer = createAudioPlayer(); const connection = joinVoiceChannel({ channelId: voiceState.channelId, guildId: voiceState.guild.id,...

createAudioResource()

Im not sure to i should ask this here or in help channel but im going there. In docs it takes string as resource input that is a file location, but i want to ask what else we can use to create a resource or directly a resource something like a Buffer or anything else For further explanation i want to store them in mongoose database and use them in future but im not sure how i can store a audio file in mongoose or i can use it or not...

Stuck in 'Signaling'

I'm having an issue that started a few months ago, and I can't seem to figure out why. Very long story short, after exactly 1 minute of being in a voice chat, the bot's voice chat status goes into "signaling". It worked fine initially (worked for months with no issues), and then this started. I'm not finding much about it in the DJS docs, and the Discord api docs mention it's part of the heartbeat stuff ... Any direction on what I need to look at in order to get this fixed? Not having our bot is starting to suck. Thanks! There's not really any code to show, but here's the log output: It's always EXACTLY 1 minute after Ready....

Joining the user's current voice channel

On [email protected] & node v18.12 I've been trying to create a command that joins whichever channel the user is in. I keep running into an issue where it doesn't read the user's current voice, instead it thinks "currVoiceChannel" is false. ```// Todo: ejoin makes bot join user when called...

Playing a soundfile

I'm trying to use discord.js voice to play a sound file. Is my thinking in how to get this to work in the right direction here or am I missing important parts here? ```js ... const resource = createAudioResource(soundfilePath);...

Bot join voice but not playing anything? discord.js 12.5.3 node 14.17.1

<rejected> Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

play-dl stops playing from youtube after a while

I have a simple music player in discordjs 14 using the play-dl library. The bot joins to the voice channel and starts playing the selected music from youtube, but after ~50-60sec it suddenly stops. The bot stays in the voice channel and there's no any error message at all. Do you have any ideas why?

Audio Not Playing

Discord JS Ver 14.13.0, Voice ver 0.16.0, Node 16.14.0 The bot joins the channel that I am in, however it doesn't play any audio and doesn't give any errors, I don't understand why?...

Tips on creating a transcription bot

Basically I want the bot to listen to each user and transcribe their voice into text. Then send that as a file when the call has ended. I know how to record and store the raw audio data but how would I go about transcribing it?

how to make echobot

I want to write code that, using connection.receiver, will listen to what the user with id 633223783204782090 says and immediately repeat it.