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

[MONGOOSE/MONGODB] How can I get a specific users schema?

Hello! I've been coding for the past few hours and can't exactly seem to figure this out so I've been trying to get a specific users totalMessages (from schema) at a specific date, heres my code (this is being run inside my command file, level/messages.js): ```js...

how do i use ``Role.icon`` hash? to get the icon?

how do I use Role.icon hash? to get the icon? like URL for image etc.

Embed Using Options Content

I can create a slash command that has multiple options. I just am drawing the short straw trying to have my bot respond to my slash command with a formatted embed using the content provided within the options. Any help would be much appreciated! DM's are open, and I am new to this so I will try my best to easily understand any help given.

Assistance getting role by ID

Im trying to get a role via ID, however, whenever i pass that roleID to permissions override in channel.create, it throws a error saying its neither a role nor a User, can i not give channel permissions this way? Code snippet: ...

Proper error handling with awaitMessages

I'm trying to optimize my code as best as possible, and this includes error handling. I understand how to catch an error with promises, but I am confused as how to pass it into .catch, because the catch arguments in the discord.js collectors guide only includes collected, so am I supposed to add a second argument for the error, or check if collected is an error? Also, in the errors parameter of awaitMessages, is 'time' the only one I can put, or are there others? Here is my current code for the bit I'm trying to optimize just in case (collecting role ID to create an action for a forms bot) ...

awaitMessageComponent breaks if separate message is deleted

I have the following code that awaits either a message, a string select menu or a button: ```ts export default async function awaitResponse( hook: Message, interaction: ChatInputCommandInteraction...

channel.isTextBased is not a function

Every once in a while, I get the error "channel.isTextBased" is not a function, which crashes my bot, and to fix it, I need to update discord.js. However, this bot going down every time there's an update is problematic. Does anyone know a way I can prevent my bot from crashing every update because of this error?

mongodb node_module error

the error ```[{ "resource": "/c:/Users/jack/Desktop/esno bot/node_modules/mongodb/tsconfig.json", "owner": "typescript", "severity": 8, "message": "Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.\n Use 'verbatimModuleSyntax' instead.",...

Is it possible to fetch all messages that came after a certain message ID ?

I have found the fetch method but not if it is possible to get all messages that came after this message id https://old.discordjs.dev/#/docs/main/stable/class/TextChannel?scrollTo=fetch Any help is appreciated !

not response without any error

hey there idk whay recently (2-3 days) i have got this problem ready callback event and everything is ok but all interactions broken i mean we receive application not response while i can see bot log usage in console for interactions but they don't work without any error. (i have logged interaction and nothing logged) ๐Ÿ’€

package problem

https://sourceb.in/peWFtMDyBx i get this error everytime i try and run

automodrule command

no error but not responding

DiscordAPIError[40060]: Interaction has already been acknowledged.

DiscordAPIError[40060]: Interaction has already been acknowledged. how can i fix this if the error doesnt give me the file name or line?...

Status

if I make a rice present with repl.it to have a custom status and have the account online 24/7, is it illegal?

can someone help fix this? im using the latest discord.js

C:\Program Files\nodejs\node.exe .\bot.js Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'FLAGS') at <anonymous> (c:\Users\admin\Downloads\bot.js:6:17) at Module._compile (internal/modules/cjs/loader:1256:14) at Module._extensions..js (internal/modules/cjs/loader:1310:10)...

Emojis in slash command "choices" not appearing

I'm trying to add emojis to the list of slash command choices (see attached image). It appears "emoji" is a valid field, however doing so does not make an emoji appear in the list of choices. Is this possible?