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

Unknown interaction

Hello i keep getting the "unknown interaction" error like 7 out of 10 times every time i run a slash command or use any component i'll share my InteractionCreate event and one of my slash commands: ```js const { Events } = require('discord.js'); ...

Unable to register slash commands

I ran into this yesterday and got rate limited but I don't understand why I am not able to create my slash commands. I'm not rate limited anymore. It expired over 12h ago. No errors log - the commands just don't register. I have them tied to a prefix command that I run to create the commands since I have 75 of them. Code for that command incoming......

Rare message double-sends when using @discordjs/proxy

Hi! I'm using djs/proxy since to my knowledge, it's the preferred way of handling rate limits for process-sharded bots in d.js. I'm experiencing some rare issues where join messages in my support server (likely others as well, this is just the server it's easiest for me to notice in) seem to send twice sometimes, and I'm not entirely sure why. I've added some logging and deduced the following: - Client is emitting guildMemberAdd only once, and this function is only being called once - This function contains no logic for retrying message delivery if it fails - These two messages are sent exactly 15 seconds apart from each other...
No description

Gateway Intents & Partials

Hi ! In this picture, what does this mean exactly?
"If you use gateway intents but can't or don't want to use the privileged GuildPresences intent, you additionally need the User partial." ...
No description

performance concerns regarding presence_update

Hello, I track online/total member counts. How many events a second should i throw at a shard? It's super vague, but hoping there's a general range I can follow

Somethings to know :)

What is these things and what is the use? ```js ws: { large_threshold: 50,...

Unknown interaction

Hey! In 1 out of 20 cases, we encounter the issue that a response to an interaction returns an โ€œUnknown interaction 10062โ€ error, even though we respond within the specified time frame. Is there a solution for this, or is this considered โ€œnormalโ€?...

Change bot bio

Guys, how do I change my bot's bio (about me)? I saw a bot with a changed bio, even with a custom emoji, how do I do that?

flags don't work or not use well (4094)

const msg = await interaction.channel.send({
content: null,
components: [container, row],
flags: MessageFlags.IsComponentsV2 | 4096
});
const msg = await interaction.channel.send({
content: null,
components: [container, row],
flags: MessageFlags.IsComponentsV2 | 4096
});
...

Adding a list of users as an option to a command

If there are 10 users in a channel and I want to not include some of them in some command, i.e. team generation, /random -dontinclude @user1 @user2 @user3, is this possible? Will a stringOption accept a list of users as an input or does it have to be strictly strings?

Is there documentation on creating non slash commands, i.e. a command is defined by a symbol ?help

Been looking through the docs but can't see much mentioned on it, would be pretty straight forward either way, just listening for messages

Large image on display components

Guys, with this example code in the Display Components tab on the discord.js website, how do I add an image like .setImage did in the previous version? I saw some bots here that have large images, in addition to the thumbnail, how do I do it? Example I mentioned above: ```const { AttachmentBuilder, SectionBuilder, MessageFlags } = require('discord.js');...

Receiving non slash command messages

I'm trying to receive regular guild messages that aren't slash commands. I'm aware of the privacy issues, it's just a private bot for my friends and I running a local AI model for fun. I used to use discord.js but it's obviously changed a lot over the years e.g. slash commands and I can't figure out receiving messages without a slash command. I've enabled all privileged gateway intents on the discord dev dashboard and here is my code....

activities.read doesn't work on oauth

I'm using better-auth to authorise user on my app and apply on user activites.read permission to fetch user's current activity, ```js discord: { clientId: env.DISCORD_CLIENT_ID,...

cache question

Hey, my bot is in a server with 200k members and I need to fetch members every 5mins, currently doing members.fetch(), but can I just use guild.members.cache How accurate cache is for that...

BOT PROBLEM

I was going to create my bot by watching a video, that is, I was going to set up the bot, but I saw that video and did everything. Node did it first, but it didn't work for me. When I type node index.js, it crashes. When I use nodemon, I get this error: `` [nodemon] 3.1.10 [nodemon] to restart at any time, enter rs` [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,cjs,json...

any way to fetch discord user's badges with the api?

i am currently using guilds/guild_id/members/member_id but is there any way to fetch user's badges?...