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

Multi select with autocomplete

Hi! I have a list with +25 items, and i would like to allow users to select multiple items in a select menu or a slash command choice. Is there any way to allow autocompleting and multi select?

Doubt about how data is tracked in embeds/buttons

I have a questiong regarding embeds/buttons, ill give you an example here: Lets pretend that im making a suggestion bot, now people is gonna use a command to generate an embed with 2 buttons, either accept or deny, how does the bot store what embed links to what user etc, does this structure include databases or am I too noob. Like users are gonna create an infinite number of suggestions and the but must know what suggestion links to what user. And im not talking about displaying user information in the embed, im talking about after using the buttons get back information about who made the suggestion to interact with it....

Help ensuring best makecache and sweeper options

These are my current makeCache and sweeper settings within my client: ```ts const client = new Client({ intents: [ GatewayIntentBits.Guilds,...

Grouped slash commands

Good evening everyone. I'm just sort of wondering how I can use a group across multiple files. For instance, say I have a /Cogs/Moderation/ structure. Inside of Moderation, I'd like ban.js kick.js, you get the gist. So inside of my ban.js I create a group like so:

All commands are not showing in the command list in the server

for some reason the only slash command that doesnt show is the spamming slash command

The bot crashes after sending one or two direct messages to the newly joined members

I am using discord.js v14. The code works. However, I don't think it is a rate limit because I checked there were only one or two members joining my discord, so it won't be rate limit. Anyway, I tried logging the error message, but nothing showed up in same directory where the index.js with the code resides. Please see attached images for the code. Thanks if any of you could help pinpoint the error. And why is that?
No description

[Solved] Voice States cleared

Hey, I noticed that when I get the voice channel, check for the members in the channel I only get the bot member while it should return me and the bot user. I have the feeling that this is bcs of my makeCache and sweepers settings. This is my config: ```js makeCache: Discord.Options.cacheWithLimits({...

How to store the members of a server, should I?

Hello, I am working on my database right now and I was thinking about storing all the members in a server in an array within the server document (mongodb). Should I store the members of a server's ids or should I just check them all when a command the needs that info is run? if I do store them how should I go about updating them and keeping them in sync?

How to add another row onto an existing message

For my bot, I have a select menu, and when you select an option in that select menu it will add a new one on-to the pre-existing one. Is there a way to add a new row with the new menu on it to the existing message without modifying any of the values?

Running Discord bot in Next.js App

I'm trying something and I decided to run a Discord bot in my Next.js 15 application and make a system where the bot is started with next.js server I was able to achieve the result as shown in the image (the page is dynamically rendered on each request and shows the current cached users of the client). All I had to do was to assign the client to a global variable and make sure that the bot is started and ready before the requests run. Thus, by using the client in the server-side components (or files) of next.js, I can use ssr without the need for an additional request (usually this is done in client-side to an express backend, a backend where the bot is running and from there you get the necessary informations)...
No description

Bot running 2 commands at once

does anyone know why my code would be running 2 different commands at 1 time when I use the balance command code is the first comment

Issue with "custom" autocomplete

I will be sending the relevant parts of my code, I'm kind of new to this so please be patient, I would like the command to load the user's options based on their inventory in mongoose, the autocomplete options don't load while the user tries to write in the item field, however the item is correctly used if the user writes the exact name (caps sensitive). I would like the autocomplete suggestions to be the user's available items, I have looked for the autocomplete in discord,js but I didn't quite understand how it should work for my case....

Put all webhooks in choices

Hi, is it possible to fetch all guild webhooks, and put them to the choices in slash command?

I need help

Can someone tell me what I need to replace with this? ``const { Client, IntentsBitField } = require('discord.js'); const client = new Client({ intents: [IntentsBitField.Flags.Guilds, IntentsBitField.Flags.GuildMessages] }); client.on('ready', () => {...

Fetch all messages in a text channel

Hey there! I'm trying to fetch all messages in a channel for my /initialize command. I'm looking at the faq example: ```js async function fetchNine(manager) { const result = []; // this will combine the results of each fetch call...

PRESENCE NOT WORKING

help does not show anything ```js // ----- Client Ready ----- client.once(Events.ClientReady, async readyClient => {...

what's wrong?

i don't know what's wrong, can someone help me? (i already reset the token)
No description

User Install Event

Hello, I'm new to discord.js; I want my bot to DM the user when he "user installs" my application, I couldn't find an event resembling user install Is what I am trying to accomplish possible with discord.js current iteration?...

Trying to figure out why my user app doesn't work in direct messages.

Is there something that need to be enabled during command registration for user apps to work in dms? Is there something that needs to be enabled in the developer portal. Does it have to be a verified bot?...