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

Discord bot to translate speech from one language to another in real time

Hi everyone! Can you tell me if it is possible to make a Discord bot that would record what a person says in a voice channel, translate it into another language and play back the translation? If you can suggest something about this, write me in private messages, I can also provide my own idea how such a bot would work. Thanks!

geis, how can I rewind audio for example 20 seconds forward or backward in @discordjs/voice

geis, how can I rewind audio for example 20 seconds forward or backward in @discordjs/voice

Missing opus packages

Hi, i'm not sure how to understand these exceptions. As per the docs on npm, only one opus package is required and we have @discordjs/opus. We used to have all 3 and after removing node-opus and opusscript it threw this today. Is it a version diff or something along that line?
No description

Error: FFmpeg/avconv not found!

everytime i run the code it says the error on the title code: ```const { Events } = require('discord.js'); ...

Does audioplayer buffering state ever time out?

Apologies in advance, might be a bit long.. Does an audioplayer ever time-out if it's in buffering state for too long? Also, if not, is there any negative effect if an audioplayer stays too long in buffering state? Memory leak or such? I am working on a discord bot, that takes an opus/ogg stream as input, which comes from another certain older discord music bot that is capable of web streaming (not sure if I am allowed to mention it's name). The stream is a response from an API call, which needs a stream token....

Users in voice channel

Is it possible to listen to the whole voice channel instead of just by users

Stuck at connecting

I have noticed that sometimes the connection state of a voice channel goes through these states: signalling > connecting connecting > connecting connecting > connecting ...

Saving an opus stream from a voice channel to .mp3/.wav/.webm

So with the help of another thread here, I managed to save an opus stream to .ogg. Now, I need to save that same opus stream to an .mp3 file instead, and i’m even more stuck than last time. Can I somehow save the audio to a .mp3 or .wav file instead? Help would be much mich appreciated… ```js...

How to save a user's voice to a local file? (.mp3 or .ogg)

```js let listener = voiceReceiver.subscribe(userId, { end: { behavior: EndBehaviorType.AfterSilence, duration: allowedPauseDurationForInputVoice...

Whether to play audio

If I send !isPlay, is there a way for the bot to check whether the server is playing audio or not?

bzioam fiaoq

Make sure you are using version 0.16.0 of @discordjs/voice or newer. Check that this also applies to all voice-related packages that may use other versions!npm list discord.js yarn list discord.js yarn why discord.js // for yarn v3+...

example.mp3 Audio doesn't play

```js if (msg.content == '!t') { const { joinVoiceChannel } = require('@discordjs/voice'); const connection = joinVoiceChannel({...

2nd time joining problem not playing sound

When the user enters for the first time, it does everything i want to do, but when a different user enters for the first time or when the same user enters for the 2nd time, it does not do anything, why?
No description

Error: Cannot play a resource that has already ended.

Hey, i have thsi error when im trying to play a radio flux url like (for example) http://belrtl.ice.infomaniak.ch/belrtl-mp3-192.mp3 This is my code: ```js const { joinVoiceChannel, createAudioPlayer, createAudioResource, StreamType, entersState } = require("@discordjs/voice");...

Volume normalization

I know this might be a bit of an out-of-scope question, but I couldn't really find any documentation on this online. I found ffmpeg has the option of volume normalization, but it would be nice to not analyze the entire file beforehand. I have a folder with a bunch of mp3s or oggs and I'm playing then using the example on the website. The issue is that some are much louder than others....

Message reaction event

Hey, I'm trying to listen for reactions on a message Id but there's no output when I react to the message, could someone please take a look at my code? events/messageReact.js: https://srcb.in/N4rowidb3P index.js: https://srcb.in/kAhoNVXfIY...

Audio duplication issue

I am working on a bot that will do, among other things, voice call recording. Something really strange is happening where I'm getting multiple copies of the same audio in different individual output files (I know this because I transcribe and store the individual files as text in a DB using OpenAI). When mixed together, it creates a weird echo effect. My question is, when subscribing to the "start" event, should I be checking the SpeakingMap to see if something is already registered for a user? Or is there something else I'm doing wrong here? Code is at the link below: https://github.com/brad95411/breadbot-public/blob/934fa4d37f62af83ee6e988c05156e8fdb7350b3/breadbot.js#L126...

Audio file does not play

Hello, I'm trying to play a sound, but nothing happens when it enters the scope where i call the play, any idea ? Here is the code : https://pastebin.com/tQGhRGTS connection is made at line 47 sound is played at line 113...