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

Lagging on voice channels

I am not sure if its the stream which is from a online source(no copyright) or discord being sus but the stream is lagging/stuttering /pausing for a sec. Any idea what it could be, like a common thing that happens or smth?

Problem with play external URL

```js TypeError [ERR_INVALID_ARG_TYPE]: The "body" argument must be of type function or an instance of Blob, ReadableStream, WritableStream, Stream, Iterable, AsyncIterable, or Promise or { readable, writable } pair. Received undefined at new NodeError (node:internal/errors:393:5) at duplexify (node:internal/streams/duplexify:199:9) at Duplex.from (node:internal/streams/duplex:146:10)...

The problem with connecting two bots.

I'm developing a functionality to relay a message from one source to multiple Discord channels simultaneously. I need to use commands from one bot to redirect the connection for another bot. Currently, it's not working as expected: When bot A is called --> Bot A joins the channel. When bot B is subsequently called --> Bot A joins the channel again (and vice versa)....

AudioPlayer auto pauses on Ubuntu VPS but not on Windows?

So I'm creating a bot that streams audio from a mp3 stream (Icecast server) to a Discord VC. It works completely fine on my local machine that runs Windows but on my Ubuntu 20.04 VPS, it suddenly auto pauses right after it starts playing. Even with local mp3 files, it still automatically pauses itself which never happens on my local machine. Any help would be appreciated....
No description

Error

Whenever I use my ping slash commands, I recieve a 'Interaction has already been acknowledged.' error. I still works in the chat room though. How can I get rid of it?

How to return player in external function

```js function playURL(interaction){ let url = interaction.options.getString("url"); const player = interaction.legacyPlayer const connection = joinVoiceChannel({...

Audio Won't Play

Converted it over to V14 and after that it just won't play but using a message output it says its playing but its not
js
js
...

Message event listener

I created a messageCreate.js file, but my bot cannot perceive the message. I checked whether the file is loaded with console.log()

How would I merge opus streams

I would like to merge two opus streams or move into one to play in a vc.

Can't install @discordjs/opus.

I am running windows 10, node v.20.4.0, @discordjs/opus v.0.16.0. I have installed Visual Studio 2022 Community Edition with the C++ workload, and use pnpm as my package manager. When I try to install @discordjs/opus after two minutes I get this error: https://hastebin.com/share/vebiterace.swift . Switching to opusscript is not an option either, because I get an error when trying to use it instead.

Error

Error: Cannot find module '/root/7bLogsBot/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.31/opus.node' Require stack: /root/7bLogsBot/node_modules/@discordjs/opus/lib/index.js /root/7bLogsBot/index.js at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)...

Error

Error: Cannot find module '/root/7bLogsBot/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.31/opus.node' Require stack: /root/7bLogsBot/node_modules/@discordjs/opus/lib/index.js /root/7bLogsBot/index.js at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)...

I want to record audio from Discord's audio channel in Node.js.

I just want to get voice data for now. Current code ```js const { Client, GatewayIntentBits, Partials, } = require('discord.js'); const { joinVoiceChannel, EndBehaviorType } = require('@discordjs/voice');...