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

im having problems to get all users with certain role

let usuarios =interaction.guild.roles.cache.get('1299746941327904779').members.map(user => user.displayName); im getting some of the results but not all of them, i have more users with that role discord.js v14.16...

Quick question on managers

I just wanted to ask a quick question on managers (specifically a GuildMessageManager): how do I use this? Is it a class I need to instantiate or what?

How to create a thread with user permission for viewing?

I use members.add, but I want to create the Thread With "permissionwrite" discord.js v14.14.1 ```js...

Giving users one coin, when they join a server through a command.

The bot rewards users with coins each time they join a server from a command "farm" The bot automatically tracks when a user joins one of these servers and adds a coin to their account (using MongoDB). The code im using for this is given down below! The issue is that the bot just dosent adds acoin to the database automatically... Code: ```js // Update the farm entry to increment membersJoined count farm.membersJoined += 1;...

How to get how many users have installed the app

On discord.dev, you can see how many users have installed the app, but I don't know how to get this value inside of Discord.JS, is it possible?

Is there a way to prevent messages from being grouped when posted by the same bot?

Is it possible to prevent messages from grouping when they are sent by the same bot? I'm writing a bot that relays messages from a forum to my channel and its kinda not clear when an old message ends and a new begins when they are grouped like in the pic
No description

Is there an efficient way to get date as option for interaction ?

I am actually making a discord bot for my university and I need to add a command to get the timetable, but the problem is, that I need a start date and a end date to get a range of courses, so for the moment users have to put date with YYYY-MM-DD format, like on the screen, but its not a really good way, its slow to type, does anyone know how can I improve this ? Im using discordjs 13.2.0 but I can update if needed...
No description

Can I pass a props into `interaction.showModal()` ?

I would like to pass a props into interaction.showModal() , because I've got separated events and my value channel is in the command file. ([email protected])

Discord Changes to Autofill - Invalid Entry Since Recent Discord Client Update

Hello. In the latest discord update, I've gotten reports from clients that they are unable to use one of my bots atm due to autocomplete saying that the input is invalid. This is for a lookup command which populates suggested entries. If the entry doesn't appear in the suggestion, thats ok, its a suggestion anyway.
According to the documentation. ...
No description

Discord slash command(s) deleting itself. (Sorry closed last post too early)

Hi. Sorry, I marked my last post as solved too early. I cannot figure out why when the bot launches and the slash commands are re-added, after the first-use of each command, they just disappear....
No description

Why might a slash command delete itself after one use?

Hi. I just created a command for my bot which works as expected the first time, and then just deletes itself from the registry afterwards. I can only think the issue comes from sharding, since I recently created the sharding manager to experiment and have it ready....
No description

Bot tries to reply to a system message.. but what is it?

What would the system message even be? I thought only users get these DMs from Discord 'SYSTEM' or is it bots too? If so, that'd explain it. Also, not really sure this is a discord.js thing, I just don't know where else to ask it.

error message and i cant solve it

there is a error that i cant fix, idk why, but can the dev community please help me 😭🙏 - included files: - Screenshot of the explorer (files) - interactionCreate.js file...

How to run recommended ("auto") shard count all in one thread?

As far as I can tell, the shard manager is always either multi-process or multi-threaded. But I can't find any other way to run multiple shards, so I'm not sure how to do that in a single thread.

Context Commands Registering

I try in more than one way to record my commands, but they do not register my code: ```js const rest = new REST({ version: '10' }).setToken(token); ...
No description

What happens at 2,500 guilds/shard if you don't automatically reshard

What happens if a shard exceeds its maximum number of guilds? Does that shard crash (due to discord disconnecting the gateway client and it not being allowed to reconnect any longer), or does the entire parent process exit as well (allowing an automatic restart to properly reshard as a fallback without duplicate/orphan processes running)

Guilds request AI

```js app.get('/users/guilds', async (req, res) => { const token = req.cookies.token; console.log('Token received:', token); ...