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

Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?

setDefaultMemberPermissions() exists but it only checks the executing user's perms. I also want to add perm checks for my bot.

Discord.js Error with my dropdown menu and button

Hello, i want to ahev every choice = command So : If I choice a option, he send me the command error : ❌ Une erreur est survenue....
No description

Unknown interaction

https://srcb.in/BSONkdUQ1S https://srcb.in/X3YTyb6NA0 It's giving unknown interaction error When I use buttons it works but when I selectmenu it gives error...

rate limit

Can someone explain in detail how the ratelimit using discord.js works 1. What methods/requests are counting for the api? 2. Do /commands also count? 3. Is there a built in way on discord js to queue requests and send them by chunks each second?...

Unknown interaction

Error Logs: https://sourceb.in/QiMpAQzc9i Command Code: https://sourceb.in/j8vU677GKg its happening with every interaction, button, dropdown menu, selection menu and I didnt changed anything in code expect Ephemeral update and its happening for some reason...
No description

Question about Discord.JS's rate limit handling

I used ChatGPT just to have it summarize how Discord.JS handles rate limiting. My scenario was something along the lines of: "How will Discord.JS handle rate limits if I sent 1 message to 100 different webhooks?" I wouldn't hit the webhook rate limit, but I would hit the global rate limit. ...

Server Member Applications processing

Just noticed that my server had this option enabled. Currently i'm using a Forms bot to make newcomers to write an application that when submitted is posted on a special #introductions channel. I'm willing to make myself a bot to manage the "vanilla" server application to dispense the use of Forms, so i want to know if is possible to "intercept" approved applications for the bot for it to post on a introductions channel?...

Buttons with Discord RPC do not appear

```js const DiscordRPC = require('discord-rpc'); const clientId = '#'; const TrackerRPC = new DiscordRPC.Client({ transport: 'ipc' });...

Custom type presence bot

Hey, i don't know how to set the emoji in the custom status of my bot, can someone help me ? ```js // Définition de la présence personnalisée avec un emoji custom et le texte "4" client.user.setPresence({...

Embed - Remove timestamp

Hi, I started creating an embed creator Discord bot, but when I set the timestamp to 1 and create a new Date, I can't remove it after setting the timestamp back to 0. I tried embed.setTimestamp(null), embed.setTimestamp(), embed.clearTimestamp(), and even delete embed.footer,but nothing works.
No description

Internal Server Error

Is this on my side or the APIs ```js try { const response = await fetch(url, {...

"Lock" feature

Hi. I need help with my own "Lock" feature. Here's how it work: - When user use /lock, get and save all of user's current roles into a map or array or something like that - Next, remove all of user's roles - If user use /unlock, give the user's back all of the roles saved ...

Issue with Node.js

i cant seem to find an answer to this anywhere but my bot used to work with “require” (that’s also what it says to use in the discord.js guide) and i made a tiny tweak in the code and now it requires me to update each instance of require to import and gives me a host of errors. what can/should i do to make this problem non-existent when making my next bot?

Issue with NASA APOD

Hey, I'm using discord.js v14 and I have a /nasa command that displays the nasa's astronomy picture of the day. But recently, the image is no longer showing in the embed, even if the url is correct. I tested sending the image embed with an online tool (embed generator) via a webhook, and the image is not showing at all. Here is the link: https://apod.nasa.gov/apod/image/2503/image_1236LeoTrio.JPG. Is there any reason to this? Is there a possibility that somehow nasa's api block the request to th...

A way to force a user to unfollow a post or remove the user without notification

Is it possible to remove a user from a post exactly how it would the "unfollow post" do? Without getting a notification from the server.

Get modal question value

Is it possible to get the question somehow from modal? You can get that textinnput value. Here is example what i mean
No description

threadMembersUpdate doesn't being called sometimes

client.on('threadMembersUpdate', async (oldMembers, newMembers, thread) => {
console.log(thread.name, oldMembers, newMembers)
});
client.on('threadMembersUpdate', async (oldMembers, newMembers, thread) => {
console.log(thread.name, oldMembers, newMembers)
});
...

Discord Rate Limit for Channel Creation

Hey guys! I'm working on a discord tool where some users would be able create a template (template i mean the channels structure and roles, perms etc) and other users would be able setup new servers using these preset templates. I have a concern about rate limits. Does limits apply to bot itself or server? For example if I have 100 members that would like to copy a template with 20 channels, it will be 2000 create channel calls. Is that possible to work?...

Seperate gateway process

Is there a way to seperate the gateway/websocket process? I want to have a separate process for the websocket and bot, so I can restart the bot with no event loss (communication between processes using e.g. redis) Aware of discordeno, bit too advanced/complicated for my use (1 server)...

How to DM users that authorized my app?

I'm making a bot that's only usable in DMs with the bot itself and I don't know how to open these DMs with the user who autherized this bot for themselves. The flow I'm going for is the user adds the bot app and as soon as that happens, I want to send the user a message with instructions. I can't find a way to do this with client.on and I'm kinda lost.