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

Preventing some guilds from being cached

I want to customize my cache to prevent my Bot from caching the GuildMembers of any guild which isn't set up in my database, because without being setup, the bot really can't do anything for the server. and I would like to save memory I have a list of ids I don't want cached when my bot starts up, and I was thinking of using sweepers to achieve this, is this the correct route to take? Additionally, can I alter the sweeper while the bot is running to add servers to the cache?...

"BitFieldInvalid" error

I keep getting the "BitFieldInvalid" error. It says throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit); ^ RangeError [BitFieldInvalid]: Invalid bitfield flag or number: GUILDS....

command handler not registering commands

. I'll upload sourcebins one moment

Owner Commands

hey , how is everyone doin , i dont have a code with issue atm since idk if what i wanna is even possible. i got some commands which are owner only which like (/reload /turnof ) which only works for me , ( turn of command will make the bot go under maintenance and will not answer to any command except to my call , in case i wanna have an update for it )....

Ports that discordjs is using?

For now for my bot to work i enabled all ports in egress rules, but I need to know which port(or port range) is discord using?

Kicking a user

```JavaScript if(button === 'kick') { const member = interaction.options.getMember(''); member.kick();...

Hello, how to make a modal in djs v13 please

Hello, how to make a modal in djs v13 please

Creating a join/leave message

How would I create one? I'm trying to use guildMemberAdd

More Builders in Modals

Hey guys, when do you think StringSelectMenuBuilder and ButtonBuilder will be usable in Modals? I don't know if it is worth waiting for them or using a different approach in my case....

Change user nickname

Good morning. I want to change the nickname of the user whose user id is entered in the command option, except I did some research and I found a line of code but it does not work, an idea ? Error : ```js C:\Users\Elève\Desktop\Project\HeartOfBot\Commands\testvalidation.js:147...

Linking guild to a specific member based on dm with bot

I have a bot that's supposed to verify people. Is it possible for the verification to happen under dms? I figure I can't do it unless I have a way to get the guild reference through the message object in bot.on('createMessage', ...)

Command that runs every millisecond - Discord.js V13

How would I make a command that runs every millisecond to check my database for a timestamp that matches the Date.now() for my premium system?

getTime is undefined

.setDescription(`**Username:** <@${user}> (${user_id})\n**Action:** User Joined\n**Joined At:** <t:${Math.floor(member.user.joinedAt.getTime() / 1000)}:F>`)
.setDescription(`**Username:** <@${user}> (${user_id})\n**Action:** User Joined\n**Joined At:** <t:${Math.floor(member.user.joinedAt.getTime() / 1000)}:F>`)
``` <rejected> TypeError: Cannot read properties of undefined (reading 'getTime')...

I can't make the new mute

I can't make the new mute. Who can explain to me please ?

how can i make button Bot Discord

how can i make button Bot Discord In V13

Fetch every thread ever in a forum channel

Is this possible? I'm trying to fetch a count of posts in a forum channel.

Bot cannot edit its own messages

With my bot I am trying to make it so that when you press a button it becomes disabled. This fails so I simplified it to just trying to edit it to some basic text to see if I somehow did something wrong but it also doesnt work. On button press I am getting interaction.message and then calling .edit on it, however that fails. Basically when pressing the button im trying to run ```ts interaction.message.edit("test")...

.setName is not a function

Hello, I cannot understand why it tells me that ".setName" is not a function. Here is my code: ```js...

New Question

How Do i make a warn commands so like /warn