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

Paginationn Questions

(This might just be a common js question, if it is please just direct me to the right source and ill figure it out) In the picture is an array with a couple objects inside etc what im wanting to do is create a new field for every object but every 10 fields create a new page (new embed with continued fields like "field 11", "field 12") as I dont want it to cluttered and plus I believe there is a limit on fields in embed objects. I know this is probably a stupid question but any help is apprecia...

SlashCommandBuilder#addStringOption: set(Min/Max)Length is unnecessary when using setChoices

```ts .addStringOption((options) => options .setName("say") .setDescription("greetings?")...

bot spawning multiple instances of the same shard and rate limiting

:NOOO: never had this issue so pardon my idiocy but bot spawns more than one instance and then i get an unhandledprmiserejection that after logging i found to be a 429 too many requests which i believe is due to the multiple instances logging in. if i use a command, i get discord API err that there's an unknown interaction. if u can help i will kiss u thx (/j)

Sending a messages to a channel without fetching the guild

Hello, I saw that some libs have functions to directly interact with the rest, for example i can send a message to an channel by putting the channel ID without needing to fetch the guild.

Variables/Changeable Data in Custom ID's

Someone recently mentioned to me that its bad for maintainability and slows processing speed when you use variables in a custom id, like a button for example. In a bot I am making I did create-embed-<channelID> and it works out great, with no issue that I see from my end or the bots end, but supposedly, I shouldn't be doing it like that, so I want to see what others think/do with their custom ID's. Is the way I do it wrong? Is there really a wrong way? How do you do it?...

Does anyone know how to setup userselectmenu listeners?

im stuck as it says interaction failed, im wondering what listeners i need to make or is there one

fix pagination

If the button press the embed would not update https://srcb.in/2C2bR1jTuJ in 1 video I want it to be like the 2nd video...

delete bot messages

is there an easy way to delete messages created by my bot like this? I tried setting to a variable the result of the members.add() and message.pin() functions, but they return the member id and target message, not a message link to the new message sent in chat.

Permissions Issue?

question, i check if bot has ManageChannels in guild, and then create a channel, log shows that it has perm, but then when trying it errors with "Missing Permissions", why https://cdn.crni.xyz/r/ppaAMMmeE.png...

Get a guild object inside an express API route

I am trying to make my bot do some changes to our server based on a request to our API endpoint. in the index.js I am starting the server and the bot, then exporting the bot to access the client on the API route. index.js...

Weird issue with GuildMemberUpdate event

i'm running into a really weird issue with the guildMemberUpdate event when adding a role: For some reason the nickname is null on the oldMember, whilst having one set The newMember does have a nickname, and since i check for nicnkame updates by comparing <GuildMember>.displayName, the bot thinks the nickname has updated while it has not....

Username bot

I know this might not be related. But how do people do this? They are notified whenever someone changes their username

Type 'X' is not comparable to type 'APIApplicationCommandOption'.

```ts import { type APIApplicationCommandOption, Message, ApplicationCommandOptionType,...

MongoDB is not working

I installed the mongoose library and entered the DB connection into the code, but it does not work, there are no errors in the console ```js const mongoose = require('mongoose'); const mongodbURL = process.env.MONGODBURL;...

Sending ephemeral messages on another message

Is there any way I can send an ephemeral message in another message when someone clicks a button? Like lets say someone clicks a button on embed #1, but then I want an ephemeral message to popup on embed #2.

fix pagination

If button press the embed would not update

Get Guild Rules Channel

Hi ! Is there a way with Discord.JS to retrieve the rules channel that is defined in a server's settings other than using the ID? Mysterious_Dev...

Closing modal after submitting

I have a modal that does not close but it makes alterations as intended (editing a embed) How i could close it without replying directly?...