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 to limit my fields (embed)

Hello, i explain my problem (sry im french)

MessageCollector not working

I am trying to get the content of the response so I can save it as a variable and move onto the next bit of information but I can't seem to work out how to get the message collector to work. I've tried 3 different methods and I really don't know what to do now. My codes current state: ```js } else if (interaction.options.getSubcommand() === 'newentry') {...

What permissions does the bot need to have on the guild to detect the 'interactionCreate' event?

I want to tag roles, use 'interactionCreate' event and send messages in channels but I'm confused

Modal imput question

In current version of discord js can you insert into modal some other components than TextInputBuilder? I cannot see this in discord js docs. I have found some screenshots that it's (was?) possible like in discord modals package. I tried to run this code but it gives error 'DiscordAPIError[50035]: Invalid Form Body data.components[1].components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (4,)....

why the icon icon_url not working

it doesnt show the icon_url

Embed with discordjs/rest

Can you send embeds using discordjs/rest? I have only sent strings using rest.post but I was wondering if I could build an embed using embedbuilder, and send that embeds with the same POST request

Missing permissions while trying to ban someone

```js throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData); ^ DiscordAPIError[50013]: Missing Permissions...

why this is not working?

```ex const Discord = require('discord.js'); const client = new Discord.Client({ intents: [ Discord.GatewayIntentBits.Guilds,...

How to use "Events"?

Hi, I want to make audit log but i do not know to use "Events". I can not find correctly source. Could you give example for random event using?

The expected type comes from property 'content' which is declared here on type 'InteractionReplyOpti

```js const type: string = this.options.interaction.deferred || this.options.interaction.replied ? "editReply" : "reply"; await this.options.interaction[type]({ // code...

Ram issues with new version

Soo I run a rather small bot that used around 600mb of ram before the most recent version so discord.js. Now with the new version that usage has gone 3/4x out of nowhere, so I wanted to ask if there is any issue related to this already known?

Re-run bot command

I'm creating a bot that has multiple steps that a user navigates using buttons. I have a "back" button that I would like to trigger a restart, as if the user had abandoned the current bot session and entered the slash command to run the bot again. Is there a way to do this? I've tried interaction.client.commands.get('command').execute(); and it fires but it seems that there's no interaction object when it runs. I would like it to create a whole new slash command interaction. Does anyone know how I can achieve this?...

Unkown Interaction Error

```2|Wave| DiscordAPIError[10062]: Unknown interaction 2|Wave| at handleErrors (/root/Wave/node_modules/@discordjs/rest/dist/index.js:640:13) 2|Wave| at runMicrotasks (<anonymous>) 2|Wave| at processTicksAndRejections (node:internal/process/task_queues:96:5) 2|Wave| at async BurstHandler.runRequest (/root/Wave/node_modules/@discordjs/rest/dist/index.js:736:23)...

channel.send() sending duplicates

Im still having problems with channel.send() sending duplicate messages even though it is inside of a for loop and it should break after the first message has been sent. In the .txt file I included console output from the time when this code sent 3x duplicate messages at the same time. This code runs every 5 minutes. If you have any idea why this might happen/ how to make it stop, please let me know. Thank you for your time ❤️

UNHANDLED_REJECTION: DiscordAPIError: Unknown Message

Hello, I have some issues about my bot. To explain where the errors come from is when I delete RulesMessage even if it deletes correctly and send the other embed (sorry for mistakes in my grammar) Here the part of the code : ```js const filter_one = (interaction) => interaction.customId === 'b-welcome' && interaction.user.id === member.user.id ;...

Max messages in cache is not working

Hello, i remark that the limit max for messages is broken, I don't have makeCache parameter in client variable So, my bot is in 90 MB, soon 100 MB oof, instead of 30-40 MB before Even if I force makeCache to 200, the number messages in cache is too big ...

General question

what is this named in discord.js

jackpot balance keeps making new data?

i do not know why but in my code it keeps making new data everytime even if it already exsists here is the code please help