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 to properly restart a voice connection after bot restart?

So lets say I restart my bot but I want all voice connections that my bot was in before the restart to be reconnected. What is the best way to do this? Does it involve using the voice sessionId?

Replaying spoken audio

I tried creating a bot that reacts to any message I send and then it should join a voice channel and repeat whatever I say. It does pick up that I speak stuff, no errors in the console, all I realized is that it switches from buffering to playing and then from playing to autopaused immediately. I guess it has something to do with the stream not continuously refreshed and read but I'm very new to streams, especially audio streams and I'm not sure on what to do. I made a reddit post according to this as well but never got a response. I have pastebin over here: https://pastebin.com/gft1WkVn I have imported everything that's needed, everything is pretty much up to date and all intents have been given as well (guilds, guild msgs and guild voicestate)...

bot finished playing

How to understand that a bot has finished playing a file to start a new one?

Cannot play audio as no valid encryption package is installed

I literally have sodium, libsodium and libsodium-wrappers installed and yet it still throws this damn error. ```haskell Error: Cannot play audio as no valid encryption package is installed. - Install sodium, libsodium-wrappers, or tweetnacl. - Use the generateDependencyReport() function for more information....

Getting existing audio player

how do i get the audio player in a guild if any?

aborted error

i get this error:
[Uncaught Exception] :
Error: aborted
Origin: uncaughtException
[Uncaught Exception] :
Error: aborted
Origin: uncaughtException
after at around 3 minutes when the bot is playing music in a voice channel...

volume

hwo do i increase/decrease the volume of bot in a voice channel? doing <Resource>.volume.setVolume() changes the volume but it's like chnages the bass of the sound and not the actual volume...

Volume

How do i get the current volume of the bot?

not joining voice channel

```js const { Client, GatewayIntentBits } = require('discord.js'); const { joinVoiceChannel } = require('@discordjs/voice'); const client = new Client({ intents: [...

Getting amplitude value from pcm stream

Hey guys. I am trying to get an amplitude value from my live pcm stream but very stuck. Code below

How te get buffer from opusStream

Hey guys. I was able to create an opus stream from voice ``` connection.receiver.speaking.on('start', userId => { if (!connection.receiver.subscriptions.has(userId)) {...

Connection

How do i check if the bot has an active connection in a guild?

How can I change the volume of an Audio Resource playing with discordjsvoice?

How can I change the volume of an Audio Resource playing with discordjs/voice?

Getting amplitude from opusStream

Hey Guys. I am trying to get an amplitude or volume from an opus stream. I would like to figure out if a person is yelling or whispering. No idea where to start. I tried using OpusEncoder.decode with data from opusStream but i don't get any usable information out of it....

Radio stream don't start with inline volume

When I play a music with a different format than opus ```js let resource = createAudioResource(stream.stream, { inputType: stream.type, // different "opus"...

Receiving and playing back voice

Hey Guys currently trying to have my bot join a voicechanne, start receiving audio and then playing that audio back. I feel like it's not staying subscribed......

After several hours of operation my bot does not want to launch the radio. Do you have a solution?

```js player.subscribe(serverQueue.connection); player.play(resource); ...

A function that can show bot ping connection (Voice Channel)

Is there a way to create a bot command that can show us the bot ping connection when the bot is in a voice channel? I don't ask or mention about Websocket or API latency.

member presence is undefined

I am trying to make a discord bot that moves you to a channel based on what game you currently play. The only problem is that the member.presence always returns undefined when the member is playing or when hes not. But i cant figure out how to let it give me a console output with the game the member is playing.

Opus wont install on Termux environment

Basically im trying to make a live transcript bot using VC but I want to use Termux for the host. I just get a whole load of warnings then Error: \make` failed with exit code: 2`