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

Can discord.js store snowflakes as bigints instead of strings?

See title, I couldn't spot any options for it in the docs and I'm curious if it's possible.

How to differentiate between the possible errors when DMing a user?

I want to do send a DM to a user and handle the errors. I know that there is more than one possible error, but not how to handle it. There is the one if the user has DMs disabled and one if user doesn't share any servers with the bot and one for Unknown user and also one for "Cannot send messages to this user". How can I differentiate between those errors and what is even possible?...

Error that i cannot fix.

I know that i asked help for this once but i still need help. This is my codes: index.js https://sourceb.in/LrDkNyzADH commands\contest.js https://sourceb.in/BO3kmjr7MH And the error I got: D:\dcbot321312\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:105 if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); ^...

Application command's options

how can i get (for example) the name of the command, or the value? i know how to get the data, but i can't figure out on how to get the name cause it says undefined...
No description

duration is null or undefined

when i do /addreminder 1s it just still says its undefined. ```const { SlashCommandBuilder } = require("discord.js"); const ms = require("ms"); module.exports = {...

Bot not receiving DM's

This is my bots code. ```js console.log(message) // If the message is from a bot, do nothing if (message.author.bot) return;...

register commands for multiple servers

i got the code for my command register file from the docs. there you need to input a guild id, but what if you can add my bot to multiple discord servers then i cant just all copy in ids right? how would i do that? is there a way to like globaly register commands?

error

what is this error mean
No description

Problem with buttons

I have this code, and most of the time (about 99%) it works without any problems. However, just a moment ago, the bot updated a message, and for some reason, there were no buttons. There is no error. [email protected] NodeJS v18.20.4 ...
No description

Application not responding

Hello everyone I am following the discord.js guide on creating a discord bot and for some reaosn after following the steps it told me that the application is not respond. Im new to posting for help so excuse me if i tag this post wrong or if I am making any simple mistakes in my code. I will add the screenshots below....

ChannelSelectMenu

Does channelselectmenu support guildvoice channels ?? Thanks for help

Idk why am i getting this error while running bot for first time

C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules\discord.js\src\client\websocket\handlers\READY.js:17 client.guilds._add(guild); ^ TypeError: client.guilds._add is not a function...

Rtc region null

https://cdn.uira.xyz/acoustic/uEPKgU.png only happens when u select a automatic region aslong as u assign a region it doesnt show null any fixes?...

Sharded Discord.js bot resets to initial presence status

I wrote a Discord.js bot in NodeJS that uses discord-hybrid-sharding to spawn my bot.js. In the bot.js code below, you can see that I have an initial status of "Starting..." and then in ClientReady I set the actual status. However, seemingly at random, my bot just goes back to the initial "Starting..." status. It operates completely normally though. I assumed it could be that a shard died or something, but why would that kill my interval? The check I tried to do in the Interval sadly doesn't work. ...
No description

I got an error that I dont understand

This is my codes: index.js https://sourceb.in/LrDkNyzADH commands\contest.js https://sourceb.in/BO3kmjr7MH And the error I got: D:\dcbot321312\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:105 if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied); ^...

Range Error Shard 0 not found

I'm getting a shard 0 not found error on the live bot, but I can't seem to replicate it in my dev environments. the full error is as follows: RangeError: Shard 0 not found at SimpleShardingStrategy.send (/opt/icarus/icarus5.5/node_modules/@discordjs/ws/dist/index.js:1205:13) at WebSocketManager.send (/opt/icarus/icarus5.5/node_modules/@discordjs/ws/dist/index.js:1449:26)...

400 Bad Request (error code: 50240): You cannot remove this app's Entry Point

I'm getting this error on my discord bot, but I don't understand it, and the bot commands don't update on the server, although some still work

Button

Hello, I have programmed a command that allows you to enter an embed using a button. However, after a certain time you can no longer react, or the bot will send you the message: "This interaction failed." How do I fix this so that you could still react to it after (theoretically) 2 days?...

Embedded Platform

Discord has decided that it will be a good thing to not document the Embedded platform which infact is PS4 (and more but unsure) Would there be any possibility that this gets removed from Discord.js as this is undocumented by discord though I am unsure as to why they show me and not document it?...

Incompatible embeds

Hey, i need to copy my previous embed, but when im try to do this typescript give me error: ```Argument of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").APIEmbed' is not assignable to parameter of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").APIEmbed'. Types of property 'type' are incompatible. Type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined' is not assignable to type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined'....