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

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

Verification system with a button on an Embed

Hello, I'm trying to make a verifitcation system. Here is my code: ```js...

Editing embeds

How would I edit the embed to include the ping?

Hidden SlashCommandChannelOption

Can you put an option that people can select channels that they don't have permission to?

Embeds being sent twice

```Javascript async execute(interaction) { const type = interaction.options.getString('type'); const channel = interaction.options.getChannel('channel');...

Interactions Endpoint Instead?

Is there a way for Discord.js to use a interaction endpoint instead of over a gateway?

Button that sends a form and a select menu that are updated does not work

Hello, I have a problem, I am creating a command that when pressing a button sends an embed and a menuselect and when choosing an option it updates the embed and the select menu to choose a few more times, the thing is that it gives me an "Interaction has already been acknowledged." and I do not know what to do.

DiscordAPIError[40060]: Interaction has already been acknowledged.

I'm having a problem with a button with this error when I click the first time it goes normally, then I go back to the BACK button, when I click dnv to enter it gives this error, do you know how to help me?

Click a button and edit the embed

Good morning. I come to you because I would like that when I click on my button, my embed is modified. What I do is that I send my embed with the buttons via a /testvalidation command and I constantly check in interactionCreate if it detects a click on the button. If this button is clicked then I ask him to take back the message stored in interaction and therefore to create a new embed by defining each of the properties that I need and then to create a new button which corresponds to the same button as in my first embed and then modify the message to replace it with the new embed and the new buttons by doing interaction.edit({embeds: [Liste], components: [row]}) out it tells me that edit is not a function... Error : ```js C:\Users\Elève\Desktop\Project\HeartOfBot\Events\interactionCreate.js:222...

Member boost counter and detecting "current active boost count" of a member

These days, boosting has become a crucial aspect on Discord. However, developers are not fully informed about the information regarding a member's boost count. The necessary information is not provided through the API. ✅ When a guild member makes a new boost, I can detect it using the guildMemberUpdate event and retrieve the premiumSinceTimestamp information. ✅ Similarly, I can also detect when a member no longer has any boosts through the guildMemberUpdate event....

fetchStarterMessage on threadCreate doesn't work

I'm trying to fetch the first message when a thread (in a forum) is created. But it doesn't work. How can i Do ? ```js...

duplicate client for shard

When connecting this file after authorization of the client with the line: require('commands.js').init(client); there is a problem with sharding. Duplicate client instances are created for the same shard. This way you get a lot of clients for one shard and the bot replies to one message many times. commands.js file code: ``` const {lstat, readdir} = require('fs/promises'),...

ActionRowBuilder in a new thread

Hello, how can I make an Action rows just after a thread creation ? I would like to moderate them and add after each new thread a row with two buttons ACCEPT / DECLINE. I'm looking into ActionRowBuilder but I don't know how to send that. is that the correct way to do ? Thanks (Another question : why the doc is so empty ?? Older docs was better to understand)...

/play command not working

client.commands = new Map(); client.commands.set("play", async (message) => { if (message.content.startsWith("/play")) { const query = message.content.slice(6); const track = query; // Replace this with your own logic to resolve the track...

Why is global_name not showing up?

When importing user information such as guilds and rules ex) guild.fetchOwner Why doesn't it show global_name? ...

Bot crashing when calling custom /suggest command

So I have a /suggest command for my discord bot that should take the user's input, and output it to a private text channel 'bot-suggestions'. I've confirmed that it's writing the suggestion to suggestions.txt, but I think the bot is crashing when it tries to send the embed? Not entirely sure what's happening here: ```js // Import required dependencies const { SlashCommandBuilder } = require("@discordjs/builders");...

I'm getting `TypeError: ActionRowBuilder is not a constructor`

I am importing it correctly like so ```js const { Client, ActionRowBuilder,...