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

Builders 1.10.1 > 1.11.x causes errors

I'm by no means a TS wizard, but I try. In one of my apps, I create a clear button that I pass around and is made available throughout the code. It's effectively a button that when hit, will delete/'close' the message it's attached to. I create it in my interactionCreate listener like this:...

what do i do yall???

ik this is some kind of connection error, it happened when i tried starting my bot, but how do i fix it? heres my index.js code btw: ```const { Client, Events, GatewayIntentBits } = require('discord.js');...
No description

Problem with Action Row

I have a problem with building new ActionRowBuilders from existed message. I am creating a tool for user to customize message, button, etc... First, I fetch a message via user provided url. Then I create an array of ActionRowBuilders from message.components value (as code below). ```ts let actionRows: (ActionRowBuilder<ButtonBuilder | StringSelectMenuBuilder> | undefined)[] =...
No description

Is there a non-deprecated replacement for MessageInteraction.commandName

Is there a replacement for this: https://discord.js.org/docs/packages/discord.js/14.18.0/MessageInteraction:Interface#commandName That's not deprecated, my bot uses it and i want to migrate to a non-deprecated solution....

question about a function

In one of my bots, i have a function named LowerRole (basically detects the lowest of the roles of a user) but when github copilet suggests stuff, i see "Locale" is that a location? cause i dont want my bot giving out others locations :SkullSanta:

Bot doesn't play music

I have the problem that the bot does not play any music in typescript

Deno or Bun support ?

Does Discord.JS support Deno and Bun officially? Or at least have a stable version.

How does CachedManager work?

How does CachedManager<Snowflake, GuildMember, GuildMemberResolvable> (specifically guild.members.cache) work in discord.js v14? When and how are members added to the cache? Is it only populated after explicitly calling guild.members.fetch() or guild.members.list()? Does it persist for the lifetime of the bot client, or is it tied to individual events like receiving an interaction or message? I'm trying to understand the caching behavior and in what situations I can rely on guild.members.cache.get(id) returning a result....

awaitModalSubmit issue

With the following code, I noticed that when I open a modal, but don't submit that modal, then use the same button and call another modal and submit, discord.js will throw an Unknown Interaction error. Is there any way to fix this error? Versions: ```bash $ npm ls discord.js...
No description

discord-rpc

```js const RPC = require('discord-rpc'); const rpc = new RPC.Client({ transport: 'ipc' });...
No description

Need help setting up d.js

I am at "loading file commands" and dont understand how to add the code to the current index.js file. I tried using ChatGPT, but it didnt work.

Crow baot

pls help me for my crow bot
No description

Missing modal update method

According to this guide, there is a method to update the message when the modal was shown from a ButtonInteraction. But here it is missing. DiscordJS version: ```bash $ npm ls discord.js ...
No description

Discord v2 components

Hello, I would like to know when the v2 components will be added to discord.js? And if there is currently an alternative to use them in JavaScript?

Bot becomes unresponsive when i close vs code but responds again when i have vs code back

Bot becomes unresponsive when i close vs code but responds again when i have vs code back and running node index.js. I tried doing pm2 setup commands but still its unresponsive, is it possibly because of hosting or is it any other cache? Your help is appreciated....

Fix Welcome @unknown-user with guildMemberAdd

Hey Our bot sends a welcome message with an @tag to the person who just joined the server. (guildMemberAdd) However since recently this has gone wrong and looks like this: (Screenshot)...
No description
Next