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

Modal Help

I have created a Context Menu Builder using Reciple (TS) with the file name 1️⃣ AddIt.ts, I also have modals handler 2️⃣ Modals.ts. I want to show the modal (from 1️⃣, already did that part of code), then wait for user input and when the user submits the modal, I want the information back from 2️⃣ to the command file (1️⃣)

Autocomplete Command not sending update

Not too sure how to explain it exactly however, I have a command with multiple Autocomplete options, therefore I have added in a "key" option so they can select what specific key they are wanting. /config reset key:string value:AutocompleteString ...

trying to set up a bot but it doesnt work

i was setting up a bot and after attempting to bring the bot online it failed

create-discord-bot issues

Im trying to run npx create-discord-bot . --typescript and for some reason, rather than creating the files, it just opens an index.mjs file. Any ideas what could be the fix for it?

Numbers in front of text.

I sent the message:
in my server and i console logged it using

in my server and i console logged it using

console.log(${message.content.slice(prefix.length)});
but the result im getting is :
but the result im getting is :
636484900888597> testing``` how do i get rid of those numbers and what are they the numbers for...

Emojis on SelectMenu

Hello, I'm trying to put an emoji in my select menu (.setEmoji) but it doesn't work. Can someone please help me? Here is the order code: (I searched on the discord but didn't find the answer)...

Typings build errors node_modules/discord.js/typings/index.d.ts

node -v v20.3.1 "discord.js": "^14.12.1" "typescript": "^4.9.5" skipLibCheck:true strict:true...

Change TS type of Client

I've made some changes to the default Client by adding a config file and some collections. While this all works I can't figure out a way to change the type of the Client so it reflects my changes. Here's som of my code ```ts...

dungeon game

I have a game project for school and the questions are asking to move the monsters in my code, I'm not able to move them whatever I do

threads, forums. parent ID

I might have glossed over where this is. Trying to make a event listener that can see the channel ID of the parent thread or forum. ``` let channelId = msg.channel.type === 'GUILD_PUBLIC_THREAD' || msg.channel.type === 'GUILD_PRIVATE_THREAD' ? msg.channel.parentId...

REST dont make Slash Commands

My guild Slash Commands dont register any more A few days ago, all was still working. But I added a context menu handler to my bot with a similar code what I has taken for my guild Slash Commands. ```javascript...

Is there a way to use a context menu builder and then get the message's author?

I want to right click > Apps > Click on my Context Menu App > console.log the author of the message (which I use the Apps on)

suggest me

how to get attachment from the specific bot id

What's the best way of storing an interaction in a Redis instance for a later reply?

Hi there, I have a command that takes awhile to process, so I'm using a queue to do each one, one at a time. I'm running into an issue when trying to store the interaction object in my redis instance which I'm using to hold the queue. Whenveer I used interaction.toJson() I get an error saying TypeError: Do not know how to serialize a BigInt. As anyone come across this issue before and is there any good way around it?...

Display Attachment in Embed

The attachment option returns: https://media.discordapp.net/attachments/889518013429194782/1136474759866109952/image.png How would I get the image URL so I can use it to set it as the image in an embed?...

Copying a slash command execution

Good evening, I was wondering if there's any way to copy paste a slash command execution, since my users will have to do them multiple times a day, instead of rewriting it every time, they could write it one time and then paste. Any ideas ? 😄...

If user has higher role than bot

Currently i have this code:
let targetMember =
message.mentions.members?.first()
let targetMember =
message.mentions.members?.first()
...