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

Rich presence

I'm trying to use the rich presence of my bot, however, when I use client.user.setActivity and pass the activity parameter, the images don't work, the texts work, however, when I change the name parameter to the name of my bot and I use "512x512pngimages" in the large_image parameter. I can use my bot's icon in rich presence, but I cannot use custom images that I uploaded to the art assets page on the developer portal

connection timeout error constantly

I keep getting a connection timeout error on my discord bot while hosting it and I don’t know how to fix it I’ve tried pm2 etc and it still dosent work how would one proceed? (I don’t want to pay for hosting as I try to be as tight on money as possible)

Issue by opening a ticket

I can't undestand why when i open a ticket i get this error: Errore durante la gestione dell'interazione: DiscordAPIError[50035]: Invalid Form Body role_id[NUMBER_TYPE_COERCE]: Value "tech_support" is not snowflake. at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:730:13)...

recognize user

I want to make a command that reads all the arguments given to a user with a keyboard and looks for which of those messages are IDs of existing people, and if it finds them, it returns all the ones it found in the form of a mention. I have this code: ```js (async () => {...

Issue catching unreact event after bot has restarted

When I react to a message then restart the bot then unreact it doesnt catch the unreaction event. Function: https://codeshare.io/pAe73x ```js // Process existing reactions...

Users showing up as "Unknown User" until you manually ping them

In the screenshots you can see the user id shows up and when clicking on the tag it shows as "unknown user" but after I manually ping them then it gets updated with their information a bit annoying since it messes with the embeds making me think they left the server or account was deleted but i use discord id lookup and they show up...
No description

Retreiving thread by it's name & it's tags

Hi Im back with one question, is there any reliable/suggested way to retreive specific thread titles by their exact name and it's contents? I haven't worked much with threads, same as tags, can I retreive it's tags?

Local image not rendering in embed

I'm trying to add a local image in an embed. Here is my code: ```js const attachment = new AttachmentBuilder('./storage/webcam_pic.png') console.log(attachment)...
No description

Getting rate-limited for making a role

I'm currently working on a bot that makes around 4 - 5 roles to play a round of Mafia. Unfortunately, I'm unable to implement my channels / roles - whenever I attempt to make one role, I get a rate limit message in my terminal, let alone make multiple. I'm not sure what it could be, as only one file is actually concerned with making roles and referencing them and I'm only doing it once. I've tried waiting a few minutes to a few hours to relaunch my bot and I'm still having no luck. After waiting, sometimes one role will be made, sometimes two, sometimes everything will work and sometimes nothing will work. It's a bit frustrating. Is it possible that I have a lot of requests in some theoretical queue? Or is it something with my codebase?...

Question regarding ephemeral replies after defer

Hey, I'm trying to make a simple command that let's me stretch an attachment image and reply with the stretched image, which works perfectly. But the issues are the ephemeral replies. I want the error replies to be ephemeral and the actual result reply to be a normal reply, non ephemeral. The error replies are not ephemeral even when setting ephemeral: true. How would I be able to achieve ephemeral replies for the errors only and keep the result non ephemeral? πŸ™ ...

messageReactionAdd execute isn't getting the right Client

Since I updated to 14.16 my messageReactionAdd method stopped working because of TypeError: Cannot read properties of undefined (reading 'cache') at getChannelAdmin (/home/container/helpers/helper.js:219:40) at Object.execute (/home/container/events/client/messageReactionAdd.js:42:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)...
No description

Tracing activity and ratelimits

Hi, I would like to be able to collect information on what all a bot is doing over the API (what endpoints are being hit and request duration etc) and be able to understand things like when ratelimits are being hit. This would help me ensure all is working well with my bot and triage things like hangs. Does Discord.JS support any means of collecting diagnostic information like this? Alternatively, is there any way to easily hook into Discord.JS internals for this?...

what is entitlementCreate event & how to add the reason field for audit logs in audit logs.

- First question is self explanatory & second one relates to how add the little thing "with reason" to audit logs as this has been a thing for a while but still didn't figure out how to do this.

Private therth not work

Pleas help me Code: ```js const client = require('../../client.js') ...

Not loading ban command

With the basic command ping it works but with ban.js it doesn't. ping.js that works: ```js const { SlashCommandBuilder } = require('discord.js') ...

how to super react? ask in help channel but never got answered

i know the guides page is yet to be updated ive looked on the doc page for reactions and it mentions bursts, where do i imply them? cheer to whoever answers and if i dont respond ive probs fallen asleep...

How do I send a premium button?

```js <message>.channel.send({ components: [ new ActionRowBuilder() .addComponents(...
No description

Can't use commands of other files

I've made a folder with the commands and i've put there a folder called test for the ping command and the user command. I've done the command handler and it doesn't work. That's how the directory looks.
No description

Forum Event

Hey, is there a way to specifically like listen to certain forum and it's posts so upon new post, a bot will send some message?