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

multiple event listeners

so this is the code i have ```js async create({ channel, member,...

Error

root@VPS-10384:~/7bLogsBot# node index node:internal/modules/cjs/loader:1137 throw err; ^ ...

Maintaining connection after restarting node

I have a bot that would connect to a channel and play sounds. I have a slash command that would play one of the few sound files I have, it works fine but when I restart node it would stay in the channel but if I try doing anything it would say that the bot isn't in a voice channel and I would have to reconnect the bot to the voice channel. I get the connection using
const connection = getVoiceConnection(interaction.guild.id);
const connection = getVoiceConnection(interaction.guild.id);
though it would still return undefined even if the bot is in the channel (This is if I restarted node when the bot was already in a voice channel) Is there a way to keep the connection even if you restart node, because I sometimes have problems when the bot is on multiple servers and I restart node. Here's the full code of the command execute function```js async execute(interaction) { try { const SoundPath = interaction.options.getString("sound-effect");...

joinVoiceChannel does absolutely nothing

```js const { SlashCommandBuilder } = require('discord.js'); const { joinVoiceChannel, getVoiceConnection, entersState, VoiceConnectionStatus } = require('@discordjs/voice'); module.exports = {...

Delete voice channel if 0 user

Guys, could anyone help me make sure the bot doesn't delete the channel if someone is there? At the moment it works, but it doesn't check if anyone has entered since the command was executed, so it deletes it! I'm not very good at API yet, I'm doing my best... ```js const { Client, GatewayIntentBits } = require('discord.js');...

Aborted

Discord js v14.12.1
No description

Why does @discordjs/opus only build properly with yarn?

Hello, I'm not sure how much this is an "issue" because I mostly used yarn anyway but I noticed when I tried to switch to Bun that neither with Bun's built-in package manager, nor with npm, @discordjs/opus is not really built, and I get a runtime error repording that the built version is missing, along with opusscript and node-opus. Is there something weird going on or is this a known thing? I really wonder because unlike npm, yarn has a "linking stage" for a couple of my native dependencies so it seems like npm just downright doesn't do something necessary....

Weird error

i'm not certain why but for some reason whenever i play an audio (in this case, another audio stops abruptly to play another) or i stop the audioplayer altogether, i get this error everything still works and i could still insert more audio or continue using the music but it's odd that i receive an error like this is it because i'm not using djs (i use oceanic.js) or is there another reason?...
No description

Playback stops for a moment and then resumes while sending request to websites

I have this is issue for a year but i always said i fix this later and now is the time to do it.The problem is when i playing music it plays with no issue but when i try to add a song to queue there is a moment that fetching video info from youtube while that playback lags and resumes like 1 second later. I think problem is node js's single-threaded nature but how can prevent this to happen?

Discord Voice doesn't play anything when join voice channel

My bot still work when I run bot in windows, but when I host it on vps (Ubuntu), it doesn't speak anything, it still slient "dependencies": { "@discordjs/opus": "^0.9.0", "@discordjs/rest": "^2.2.0",...

audio duration

is there any way yo get the audio duration using @discordjs/voice

VC join embed

when someone joins a vc and a group of people have I want a /vcinvite command that says join a vc with (users in vc) and then has a join button under that connects you to the vc

Anyway to stop the audioPlayer from playing in another file?

I want to stop the audioPlayer from playing in another file, is there anyway to do this without importing it?

Why is there no audio playing

Sorry I have an issue of no audio playing. https://gitlab.com/seabass6969group/barginingewan_bot/-/blob/master/src/commands/getCreeped.ts?ref_type=heads code is here I have confirmed that the discord bot can join in to the channel and also no error message is being split out...

having issues with discord voice during `npm install`

When I tried to run npm install inside a docker container in the built process it breaks. And I have no clue why is doing that. The detail screenshot is attached. Docker container running arch Linux Installed ffmpeg and nodejs and npm gitlab repo: https://gitlab.com/seabass6969group/barginingewan_bot/...
No description

Why?

is not working
No description