discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

User Flow Diagram for Music Bot AudioPlayer Behavior

Has anybody made or seen a flow diagram for music logic? I'm looking for something that totally documents the procedure beginning at the initial play call to building the AudioResource, handling of skips, pause, resume, reconnection/error handling (disconnecting bot, moving bot to different channel, connection loss, etc.), and a graceful exit. YES, I have read the docs, but it'd be helpful to have something to reference so that I don't miss any important steps that are hard to debug. If nobody has a solution, I'll take one for the team and share my diagrams once I've built/tested my solution. If this post is in the wrong category or has already been answered (I couldn't find a similar post), please kindly refer me to where I should go 🙂...

Recording a user

Has anyone made something similar to a Discord bot that you can talk to in VC? 1. You say a message 2. The bot converts to text 3. Bot sends to API (e.g. GPT)...

Merge audio buffers

hey, i would like to merge audio buffers from @discordjs/voice, how can i do ?

Bot is silent in voice

The bot has worked in voice for the last few years, had to restart tonight because of different reasons and suddenly, the bot connects and really believes it's playing in voice, but is completely silent.

Bot Doesn't Start Playing (Green Circle)

Hey, Bot is joining to channel and bot has admin permissions but no sound ```js const connection = await joinVoiceChannel({ channelId: "1249051760610246846", guildId: "869927911526903828",...
No description

Probleme Player

hello i have probleme my discord bot is good in local fille but in my vps he doesn't work you know why ? ``` Error: Status code: 410...

The operation was aborted

My bot successfully connects to channels, then tries to await entersState(connection, VoiceConnectionStatus.Ready, 15e3); but for some channels it enters to the Ready state successfully while for others the following error is got: AbortError: The operation was aborted at EventTarget.abortListener (node:events:993:14) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)...

Possible to modify buffer as it is streaming?

I'm creating a bot to play a preset library of sound effects. Currently only 1 sound effect can be played at a time. My desired behavior is to: - Combine the buffers of two sound effects so that they overlap, with the 2nd sound effect being overlaid at the current playhead position of the first - Begin playing this new buffer instead of the old one, without stopping playback Is this possible? Is there a way to handle each chunk of the stream manually?...

Voice Question

how do i play youtube using @discord.js/voice or whatever it is called. most of my code doesnt work. im using vsc ( visual studio code)

Playing sounds from blob or URL

I'm trying to integrate my bot with SupaBase. I tried using passing to createAudioResource either URL to to that resource or passing blob but it's not working.

Discord Speech to Text Bot

https://gist.github.com/tyliec/ddcb3dd66328f8aa8e7384e0789ea01e https://github.com/AlchemiistCreative/discord-stt-example https://github.com/vadimkantorov/discordspeechtotext Every single one of these is outdated af Please does someone have a non outdated one and for some reason when I try to use Opus it causes npm related issues. ...

Playing Base64 Through Voice

How can I play base64 data through voice?

bot stuck in signalling state

trying to set up a music bot - cant get it to join my VC djs 14.15.2 /voice 0.17.0 Intents seem correct:...

Reduce playing audio latency

Hi, I'm currently trying to convert an incoming audio stream (mulaw) to raw opus bitstream. Using ffmpeg and inputType as raw, I'm able to achieve it, but that introduces 3s of latency. Unfortunately, the incoming stream is real-time data, so this latency has to be reduced. I did manipulate around with ffmpeg, and got it to play a quiet popping noise under 1s (ofc that only happens when the stream audio is very loud). Here's my current ffmpeg setup (which doesn't work). Is there anything else I need to transform in stream for it to work? ```ts...

to find my chat

it is hard to find chat

Not playing audio on linux machine

Hi i've a streange behavior in my script, on windows machine and on docker in the windows machine the audio is playied fine. When i try the same code in a linux machine it doesn't work, neither on docker in linux

Error installing @discordjs/opus

I've been trying to install @discordjs/opus with Bun 1.1.8 and also Node 20.1.3, but it always throws me the following error. I notice that the command is trying to fetch a prebuilt binary that doesn't exist...

AudioPlayerStatus Stuck in Buffering State

Making another post in djs-voice after being directed here by another member I have a bot that can play Audio and has successfully done so for the last while. I have two instances with their own Apps, a test bot and one run on a cloud server. Both are running the following discord dependencies:...

Bot is not joining voice channel after executing function in voiceStateUpdate event

After I made a function that is responsible for automatically playing the radio when a user joins the channel, the bot does not join the channel at all despite the variables being correctly defined. Debugging showed nothing (I tried logging connection, player, stream, resource sequentially), however everything seems to be used correctly. I am using almost the same code in the radio.ts command which is responsible for starting the radio manually, where everything works correctly. The only thing that changes is adapterCreator which I currently think is the problem in my function....