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

Question about v0.6.0

The next version of DiscordJS documented at https://discord.js.org/docs/packages/core/0.6.0 will be the v15 or it's a complete brand new package that will be the stable in the future?

My bot is running on only Node.js v16 not v18

``const express = require("express"); const app = express(); app.listen(() => console.log(Bot Is Ready`)); ...

Migrating to v14 (Typescript)

Hi there I'm having trouble porting this v13 code over to v14 ```ts 1 const msg = interaction.targetMessage as Message; 2 ...

User being displayed as [object Object]

Hey, I'm trying to display a leaderboard of users having the most gold saved in my sqlite database, here's my command: ```js async execute(interaction) { const private = interaction.options.getBoolean(OPTION_PRIVATE); const usersAmount = interaction.options.getInteger(OPTION_AMOUNT_OF_USERS);...

error

I have such a problem, the channel id in config.json is correct

Spams the shard log and does not write what it says in 'disconnect' when it starts to initialize

I wanted it to write what i wrote in 'disconnect' when it starts to initialize in the following shard system and i wanted it to write what it says in 'ready' when the shards are ready, this is not happening and it keeps spamming the message in 'ready' over and over again, why?

ActionRowBuilder type in interaction.reply component

Hello, I'm creating a typescript discord handler and want to try the buttons, however I have a typing error. I looked at the doc and it's well written. Do you have a solution to my problem? note: the CommandContext is the same as the ChatInputInteractionCommand, but with additional methods, the reply method is a copy with the same options as in the package. ...

Problem with onboarding my bot.

Hello, I'm having problems with the onboarding, what happens is that when a user changes roles in the onboarding, my bot detects it as a channel, role or guild has been updated and I don't know what to do to prevent that from happening.

Problem with incorporation my bot.

Hello, I'm having problems with the incorporation, what happens is that when a user changes roles in the incorporation, my bot detects it as a channel, role or guild has been updated and I don't know what to do to prevent that from happening.

messageCreate not working in dms

I am unable to pick up any messages from dms using the messageCreate event, I have the correct intents and partials, whad do I do?

Why i can't find my user data in 'Message'?

So, im trying to create a awaitMessage with button interaction here is the code ```ts const msg = await i.editReply({...

Documentation on Collection

Looking for the docs on the Collection class on the Discord.js website and all of the links take me to the main discord.js.org page like it can't find the page. Here is the URL that the Docs sent me to after clicking a link to the Collection https://discord.js.org/docs/packages/collection/1.5.1/Collection:Class#/ ...

Optimization

Hello, I have a question can I optimize, reduce this line of code or not at all?
if(req[0].staff !== "player" && req[0].staff !== "owner" && req[0].staff !== "moderator") return message.reply({ content : `test`, ephemeral: true})
if(req[0].staff !== "player" && req[0].staff !== "owner" && req[0].staff !== "moderator") return message.reply({ content : `test`, ephemeral: true})
...

Does it good using collector inside a collector?

Hi, so i was creating a collector message with button, and i want to made a second collector when user react the button but it's ephemeral, my question is, does it good using a collector inside a collector? but the second collector is ephemeral

Creating a modal after a button click shows an "Unknown Interaction" error

I've created a system which dynamically creates a sequence of embeds, components and select fields for a Setup command. My hope is that I can also add into it an option for creating a Modal, so when I need a text input from the user I can show it in a more elegant way than just "type a message in chat". Whenever I send a modal using this system (clicking a button can generate a Modal element), the modal shows up on Discord, but the bot crashes with an DiscordAPIError[10062]: Unknown interaction error. Researching, I came across this: ...

I have a issue where if my bot is turned off and back on it isnt catching who is leaving at all

client.on('guildMemberRemove', member => { client.channels.cache.get('1133203797771046912').send(**${member.user.tag}**, Has Left ${member.guild.name}); });...

How to import images in a embed message?

how to import images that are in my bot folder in a embed message? Node -v 18.16.0 discord.js 14.11.0

Is there any way to edit an ephemeral by message and channel id?

Is there any way to edit an ephemeral by message and channel id?

Edit Embed

Is there any way to edit old embed with his message id?