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

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');...

Bot not automatically leaving the voice channel even after the user leaves

I have this code where the bot joins a voice channel where the user joins and starts playing audio from the mp3 url. Now I want the bot to automatically leave the voice channel after all the users left that voice channel and only bot is there. I have this code linked down below which is suppose to do that but I am not sure why its not working. Can anyone please help me on this. TIA Discord.js v13 code: https://srcb.in/1J5dEvYvah...

i'm allowed to create a spotify music bot on discord?

i'm allowed to create a spotify music bot on discord?

[ERR_INVALID_ARG_TYPE]

[ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received type number(0)
[ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received type number(0)
The code: ...

Discord bot not playing song from an custom mp3 api url

I have this code for the command where the bot suppose to play the audio from the mp3 url which is: https://api.onlyhit.us/play Here is code for the command: https://srcb.in/udqj0lkpDd Currently what happens the bot joins the voice channel and keeps himself defan and doesnot play anything. ...

Huge error whilst trying to install opus

Hi! I'm trying to install opus on my bot, but when I run the npm install command, I get the biggest error I've ever seen. Usually I'm good with understanding errors but I can't figure out where this one is coming from? Is anyone able to help? Thanks

radio bot on docker container doesnt work !

i'am trying to run a radio bot on a docker container, the bot work well and join the channel but there is no sound. ps : its work on my localhost...

How do I check how long a resource has been playing for?

Newest version everything, how can I check, whether through an audioPlayer or voiceConnection object, how long a certain audioResource has been playing for? Thank you

(node:37) [NoExtractors] Warning: Skipping extractors execution since zero extractors were registere

(node:37) [NoExtractors] Warning: Skipping extractors execution since zero extractors were registered

Spotify music bot not playing audio

Hey everyone, So after realizing both the youtube aspect and soundcloud aspect of a music bot is against TOS, i'v removed both parts of my code. But i've still not resolved the issue of it not playing audio at all. Everything seems to be working, but the bot it doesn't start playing audio when coming into the voice channel. I get no errors or anything....

Cannot play .mp3 user attachments

Hi there, this command is supposed to allow the user to upload a .mp3 file for the bot to play, but I cannot get it to work. Here's how I wanted to work. 1. User requests /playmp3 and has the option to upload an attachment (.mp3) to play (see photo for example). 2. The bot then plays that given .mp3 file in the voice channel. ...

Player emit idle event without playing

```js let connection = joinVoiceChannel({ channelId: voiceChannel.id, guildId: voiceChannel.guild.id, adapterCreator: voiceChannel.guild.voiceAdapterCreator,...