discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

Double registering

Discord double registers my commands. Basically I edited my code (the commands file code) and instead of replacing it, it created a new one and kept the old one. index.js: https://sourceb.in/MRyhH8VDc7 commands.js: https://sourceb.in/l9Bh6VBaSZ commands/lawcodes.js: https://sourceb.in/3xuIfoH583 ...

buttons inside embeds

how is it possible to get buttons INSIDE a discord embed??
No description

Multiple images in embed

You can send multiple embeds that share the same url property but have different image.url values but is there any new update to embed builders to make this easier?

Components V2 question

I was wondering if there is a way to create inline fields like in normal embeds using components v2? I have tried looking on discords api.

interaction.reply error handling

Hello. I want handle every interaction.reply error by the interactionReplyErrorHandler function. Is it possible to do this without writing after each execution .catch((err) => interactionReplyErrorHandler(err, interaction))? I tried to create a wrapper class, but can't understand how to do this universal, not HandledChatInputCommand, HandledUserContextCommand etc. and may exist more native methods...

Ask about discord.js and typescript

I have an event handler call message-delete.ts Which type should I use when message is using as function args? Here's my code. ```ts import { Events } from "discord.js"...

I have a problem with member.roles.cache.fetch()

```js import { Client, GatewayIntentBits } from 'discord.js'; const TEST_TOKEN = ''; const TEST_GUILD_ID = '';...
No description

i have problems with the slash command

im new with the bots and been following the guide and everything, been trying to make the slash command, but is not working not even showing the option to use it here's the code screenshoot...
No description

Cannot read properties of null (reading 'byteLength') with AttachmentBuilder & @napi-rs/canvas

Moving my question from the djs help channel to here. currently running into an issue when attempting to edit an interaction reply with a buffer image created using napi-rs/canvas ```ts const captcha = await buildCaptcha(correct);...
No description

Find whether a user is on mobile or pc, from a user installable command

i know this is possible using the guild intent, but as it isnt installed on a server, i dont think it would be possible? Im trying to respond with a conditional output depending on the device? is this at all possible?

Set Image for Forum Post

How can I set the image of a forum post when using components v2? - discord.js 14.19.3 - node 22.15.0 ...

GuildDeleteEvent called at bot start

When I start the bot, the GuildDeleteEvent is always called for the same guilds. The bot is also no longer on these servers. But this happens every time I start the bot. Could it be that the guilds are still somehow wrong in the cache or something?

this interaction failed

```js async function lockChannel(interaction, channel, guild) { try { await interaction.deferReply({ ephemeral: true });...

Question about a discord.js v14 bot

So, my discord.js v14 code sends the embed and everything. Tho, the embed says the Home, California Law, Bill information. I want it to say in the description the part where the law itself is. The code: https://sourceb.in/CmINR5gv9z It fetches the information from the website. Please let me know how I can correct it...
No description

Help

I need help to work my web I need free domen in port

Registering multiple commands for many guilds

I am trying to register 7 premium commands only for 1 guild and 25 public commands for all the others (including the premium guild). I tried 2 approaches - - Using the GuildApplicationCommandManager Class - Using REST API...

How can I get information about a member's clan tag?

How can I get information about a member's clan tag (Guild Tag)? For example I have my own "QZR" and I want to check it in my bot, how I can do it?...

Organization of my bot questions

Hello, I just created my bot and I was wondering if it exist known pattern of good organizations. for the moment, I made a main index in which i call all my files in a folder for all kind of events (messageCreate and voiceStatusUpdate for the moment) each of them call files in a folder named modules to store all features related. for example I have my module "Misc" in which I call my function "ping". does it look good for you?
No description

Commands won't show up in DMs

I cannot for the LIFE of me get commands from my bot to show up in dms with other users.

Removing chosen option from a string select menu

-# this might be a very simple answer, just cant find a solution to it hence the title, is it possible to remove all options chosen by the user? i have tried deferUpdate as it works with buttons and menus to remove the "loading" state. one solution is editing the original message but with multiple people using this at a possible short timeframe then ratelimits will be hit, which noone wants....