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

Private Message all members in server (D.JS 14)

i'm trying to make an annoucement system, and make it private message all members of the server when annoucement command activated codeblock: ```javascript const ANNC_TYPE_NOTIFY = "Notify" const ANNC_TYPE_EVENT = "Event"...

client.on('error')

how to use client.on error i am trying but it is not working ```js // Set up the WebhookClient const errorWebhook = new WebhookClient({ url: 'https://discord.com/api/webhooks/1318861980961869824/pH0kBIvVsztzqMXRRsTDd3zuxQexVPixLHadgqx5fXb0VtFMF8B_QKtFaSNP3n1D-GVs' }); // Replace with your actual webhook URL ...

Step by Step Collector

Hey guys hope u are all doing well , so here is my problem. What im trying to achieve is an step by step process that collects data from users , so when first step is done , it goes to next step , and so on. Im trying to achieve it by using collectors , how do i use them? , i thought that i can use nested collectors ( when i stop the step one collector i make another collector right there so it all goes nested. )....

Disable init information from WS with Guild intent

There is a problem. When I connect the Guilds intent, it automatically parses absolutely all the basic information about ALL servers. This takes a lot of time and RAM, is it possible to somehow disable receiving basic information at the very beginning, without losing events in the future?

Best way to chain select menus

DiscordJS version : 14.15.3 NodeJS version : 20.15.1 Hello guys ! Context :...

Question on message component collector

Code: https://pastebin.com/BNTzU7AQ I have a message with register, home and remove buttons, when clicking on register button, the embed changes and it shows a string select menu, upon selecting items, the embed content changes accordingly and it shows home button to go back to main menu, everything works, but the issue is that after selecting items from the menu, the home button is taking some time to load and it shows 'This interaction failed' although nothing is breaking and the button works. What am I doing wrong here? Please help....
No description

SlashCommand interaction is undefined

Hey, I just encountered an Error I can't explain... I get an error every time I execute an SlashCommand from my Bot telling me "interaction" is undefined. I haven't changed anything in my App for a couple of weeks, so I can't tell when this error started to occur. Things I've checked:...

Discord bot being rate limited while spawning shards?

Error: "Not enough sessions remaining to spawn 1 shards; only 0 remaining; resets at 2024-12-17T11:27:23.053Z" My Discord bot was running on my VPS through docker. I went to restart it and I got this error. I'm not sure why. The bot was working find as far as I know while it was online. Why might I get this error?...

Image in Embed

``` const { EmbedBuilder } = require('discord.js'); const { twiter } = require('../config.json');
module.exports = {...

How to import embeds from 1 file into 2 without creating embed in 2 file?

Let's say I have a config.json file in which I wrote 5 different embed messages. And there is info.js, which should output one of these messages depending on the role of the participant. How to do this, because I have an error with the fact that DiscordAPI requires minimal data in embed messages.

$message.content returning nothing

When i send a message it replies - 'You said: $message.content', if i try and splice it i get an empty error, so $message.content has no value, how come this is?
No description

How to make a user installed app

Hi, I just went over discord's guide on user installed apps : https://discord.com/developers/docs/tutorials/developing-a-user-installable-app I was just thinking, is d.js supporting user installed apps ? Cause i'm using TS and I want types and the good stuff that d.js provides likes the API interactions....

Discord bot

Do someone can help me fix this problem?
No description

Help with discord bot

Do someone know how to fix this?
No description

No discord user id mention in embed

So i've connected my bot into my FiveM server and when mentioning players on discord with there discordID in embed ``` const express = require('express'); const { Client, GatewayIntentBits, EmbedBuilder } = require('discord.js'); const bodyParser = require('body-parser'); ...

error modal

``` DiscordAPIError[40060]: Interaction has already been acknowledged. at handleErrors (D:\MartozAifoo\node_modules@discordjs\rest\dist\index.js:727:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (D:\MartozAifoo\node_modules@discordjs\rest\dist\index.js:831:23)...

Is there a way to save every username change into some kind of array (using mongodb)

Right now I'm using this Schema to push user info to mongodb ```js const addUser = async (user) => { const mongoose = require('mongoose'); ...

Unknown Emoji Error when trying to react with unicode emojis

Hi, i am trying to react with a standard discord emoji, and based on the docs I am using the unicode emoji. I copied the exact emoji shown in the example (other unicode emojis don't work either) and tried to react, but I am getting the Unknown Emoji Error. My same code used to work earlier this year. This is the code I used to test it: ```js const { Client, GatewayIntentBits, Events, version } = require('discord.js');...

How do i delete a followup to a deferreply using a button?

I currently have await interaction.deleteReply() in the button callback but it gives the error error: Uncaught (in promise) DiscordAPIError[10015]: Unknown Webhook.