d.js docs
d.js docs
DIAdiscord.js - Imagine an app
Created by #ToiYeuSweetLiquor <3 on 4/23/2025 in #djs-questions
Problem with Action Row
Structures from the API cannot be edited directly. To do so, you can create a new structure (a builder) using the .from() method
const newEmbed = EmbedBuilder.from(embed).setTitle("title")
const newRow = ActionRowBuilder.from(row).addComponents(component)
const newEmbed = EmbedBuilder.from(embed).setTitle("title")
const newRow = ActionRowBuilder.from(row).addComponents(component)
5 replies
DIAdiscord.js - Imagine an app
Created by #ToiYeuSweetLiquor <3 on 4/23/2025 in #djs-questions
Problem with Action Row
:method: (static) ActionRowBuilder#from() [email protected] Creates a new action row builder from JSON data
5 replies
DIAdiscord.js - Imagine an app
Created by kotek on 4/23/2025 in #djs-questions
Is there a non-deprecated replacement for MessageInteraction.commandName
:interface: MessageInteractionMetadata [email protected] Partial data of the interaction that a message is a result of
3 replies
DIAdiscord.js - Imagine an app
Created by Skullfromroblox on 4/21/2025 in #djs-questions
Need help setting up d.js
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
21 replies
DIAdiscord.js - Imagine an app
Created by Incontrolable on 4/21/2025 in #djs-questions
Crow baot
Determining your discord.js version: - npm list discord.js - Make sure you use the right documentation for your installed version (selector on the left)
34 replies
DIAdiscord.js - Imagine an app
Created by Incontrolable on 4/21/2025 in #djs-questions
Crow baot
:guide: Home: Introduction - Before you begin... read more
34 replies
DIAdiscord.js - Imagine an app
Created by #ToiYeuSweetLiquor <3 on 4/21/2025 in #djs-questions
Missing modal update method
5 replies
DIAdiscord.js - Imagine an app
Created by &tokyo on 4/21/2025 in #djs-questions
Discord v2 components
discord.js does not support features until they are officially documented. While there might be a way for these features to work, it can change at any time without any notice
15 replies
DIAdiscord.js - Imagine an app
Created by TheActualGamer1YT on 4/15/2025 in #djs-questions
How would I fix this code?
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops. - Once you do, log relevant values and if-conditions - More sophisticated debugging methods are breakpoints and runtime inspections: learn more
212 replies
DIAdiscord.js - Imagine an app
Created by Zen on 4/19/2025 in #djs-questions
How to upload your emojis to a bot via Discord JS
:method: ApplicationEmojiManager#create() [email protected] Creates a new custom emoji of the application.
// Create a new emoji from a URL
application.emojis.create({ attachment: 'https://i.imgur.com/w3duR07.png', name: 'rip' })
.then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))
.catch(console.error);
// Create a new emoji from a URL
application.emojis.create({ attachment: 'https://i.imgur.com/w3duR07.png', name: 'rip' })
.then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))
.catch(console.error);
4 replies
DIAdiscord.js - Imagine an app
Created by Kaizo on 4/17/2025 in #djs-questions
In DM commands is not working
To receive direct message events on "messageCreate" with your bot, you will need: - The DirectMessages gateway intent - The Channel partial setting
12 replies
DIAdiscord.js - Imagine an app
Created by Blazing on 4/16/2025 in #djs-questions
How to reset select menu placeholder after an option is selected
:method: Message#edit() [email protected] Edits the content of the message.
// Update the content of a message
message.edit('This is my new content!')
.then(msg => console.log(`Updated the content of a message to ${msg.content}`))
.catch(console.error);
// Update the content of a message
message.edit('This is my new content!')
.then(msg => console.log(`Updated the content of a message to ${msg.content}`))
.catch(console.error);
6 replies
DIAdiscord.js - Imagine an app
Created by Blazing on 4/16/2025 in #djs-questions
How to reset select menu placeholder after an option is selected
:method: MessageComponentInteraction#update() [email protected] Updates the original message of the component on which the interaction was received on.
// Remove the components from the message
interaction.update({
content: "A component interaction was received",
components: []
})
.then(console.log)
.catch(console.error);
// Remove the components from the message
interaction.update({
content: "A component interaction was received",
components: []
})
.then(console.log)
.catch(console.error);
6 replies
DIAdiscord.js - Imagine an app
Created by TheActualGamer1YT on 4/15/2025 in #djs-questions
How would I fix this code?
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
212 replies
DIAdiscord.js - Imagine an app
Created by Blazing on 4/15/2025 in #djs-questions
Pinging Roles on interaction reply messages
You can control which entities receive notifications via the allowedMentions option. You can: - Set a default on the client - Set for a specific message - Use the repliedUser key to disable in-line reply mentions
{ ..., allowedMentions: { parse: ["users", "roles"] } }
{ ..., allowedMentions: { parse: ["users", "roles"] } }
7 replies
DIAdiscord.js - Imagine an app
Created by rohan on 4/15/2025 in #djs-questions
What's the most effective way to handle hundreds (300+) of users who join a single VC to be sorted?
:event: (event) Client#voiceStateUpdate [email protected] Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes.
28 replies
DIAdiscord.js - Imagine an app
Created by Thiago - Csync on 4/13/2025 in #djs-questions
Problem getting null image
documentation suggestion for @Thiago - Csync: :function: calculateUserDefaultAvatarIndex [email protected] Calculates the default avatar index for a given user id.
18 replies
DIAdiscord.js - Imagine an app
Created by Panda on 4/13/2025 in #djs-questions
Issue with dm message event using messageCreate.
:dtypes: v10: ChannelType - GuildText read more
14 replies