discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

Re; Server Member Applications

Discord has recently been rolling out the Server Member Applications feature, expanding its original use beyond clans. Article: https://support.discord.com/hc/en-us/articles/29729107418519.
I was wondering if Discord.js currently supports this or if itโ€™s still too early for implementation. Has anyone looked into this yet?...

Unknown interaction, what could be the reason?

I am currently working on a bot that requests an api and then sends it back, the typical one. Everything worked and all interactions worked, but suddenly it stopped working. No interaction, be it commands or buttons, works anymore, the same error message always appears. I thought this could be because the interactions take too long, I tried defer etc. but it didn't help. What could be the reason for that? - discord.js version: 14.18 - node version: v21.7.3 ...

Discord.JS Stats Database

How can I display 1d, 3d, 7d of text & voice channel activity and also the top text & voice channel as shown in the picture. So what I mean is what my database should look like. I use supabase for this and would like to have everything in one database table. I would do it like this. Gladly improvements or ideas: - guild_id INT PRIMARY - user_id INT...
No description

Can `.addChannelOption()` take more than 1 channels as input?

I have a discord bot for creating breakout rooms. It has 2 main slash commands: 1. create breakout rooms (voice channels) 2. move members from the main room to the breakout rooms. I have a problem with the 2nd slash command, which takes 2 input: the main room and the breakout rooms. It seems that .addChannelOption() can only take 1 input, so I have to create multiple .addChannelOption(), which is cumbersome from the user's perspective. (screenshot 1)....
No description

Possible AsyncEventEmitter memory leak detected

Anyone knows why my discord bot throws this errors?

Published announcement channel messages fire messageEdit event (v13)

Hai yall, I'm still migrating my bot to v14 but ive noticed my v13 bot is logging published announcements as edited messages for some reason, has anyone else encountered this issue or is it just the way i wrote it? I'm happy to send my code if necessary :)...

Adding old messages to the cache and making them listen for events like messageReactionAdd

Is this possible? I tried to add manually channel.messages.cache.set(id, message) but it didn't work.

The problem with shards

The bot was launched two days ago, it was on the host, it worked 24/7, in a single instance, but yesterday something happened and the bot suddenly died, and when it started, there were errors, although there were no incomplete sessions, etc. Other bots don't have such problems. I use the bot to synchronize users in the tg channel and the discord server. ```js Error: Not enough sessions remaining to spawn 1 shards; only 0 remaining; resets at 2025-02-23T21:04:34.120Z...

Embeds

Hi, I used discord.js a lot time ago, can somebody explain me how put embed in 14.18.0?

I need someone to write me a bot in exchange for a percentage of sales.

If you are interested write in dm.๐Ÿ‘๐Ÿฟ

createMessageComponentCollector not a function

Hello, I searched this server for my issue and found some similar ones. However, the answer usually seems to be what I'm already doing (awaiting a reply first and calling the create on the reply). ``` message = await interaction.reply({ embeds: [pageEmbed], components: [row], withResponse: true }); const filter = i => ['prev', 'next'].includes(i.customId) && i.user.id === interaction.user.id && i.message.id === message.id;...

Failure to create channel

For some reason, I tried a lot of ways to create a channel when they click the button but it doesn't work every time. ```const { Events, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, PermissionsBitField } = require('discord.js'); module.exports = { name: Events.InteractionCreate,...

Regex error when setting name of subcommand integer option

Hey. I'm trying to set the name of a subcommand option, yet I get this weird regex error from doing so that I haven't quite figured out yet. Any thoughts? See comments for error. Related code snippet: ``` const data = new SlashCommandBuilder()...

Auth Webhooks

Discord recently added the ability to get webhook notifications when a user authorizes your app. Does djs support this in any way, or should I set it up manually via express?

Embed message problem and no ping

The Problem is that i cant ping in the following code and some parameters as footer and author wont get set after modal was submitted
No description

App in user account and guilds

A Discord user has added a bot to their account and is using it inappropriately. How can I remove the bot from this user's account? Another question: is it possible to check which users have added the bot like we do with guilds?...

'maxComponents' and 'max'

What's the difference between maxComponents and max in MessageComponentCollectorOptions?

Slash command unknown interaction without reload

I have been building a discord bot with slash commands, it is frustrating that everytime I restart my server, the discord page requires refresh/reload too to have the latest slash command May I know what is the fix to it, have been trying to reset slash commands and clear cache too, but none is working ```typescript...
No description

How to connect Discord Gateway API on the NodeJS backend

I want to listen my entitlement create, update and delete events on my backend nodejs app and then save the details in my own database.

Help with ticket bot

Need someone who programs in js. I have a problem with the ticket panel and select menu. I would like the tickets after selecting the appropriate category from the select menu to create on the appropriate channel.
Next