discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with the Discord bot API.

Join
S๐Ÿ”ฅ Samagio.4/28/2024

Objects not getting pushed to collection.

```js const removed_roles = []; if (added_roles && added_roles.length && previous_rankbind[0] > account_group_rank) { previous_rankbind[1].roles.forEach(async (role_id) => { if (member.roles.cache.find((member_role) => member_role.id == role_id) && !next_rankbind[1].roles.find((next_role_id) => next_role_id == role_id)) {...
NNadir4/28/2024

Not Found - GET npm install

I get this error: npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/intigritycheck - Not found npm ERR! 404...
Bbr4/28/2024

problem with permission override

problem lies in line 42
No description
BBass4/28/2024

Confirmation and error messages problem:

Hi everybody I'm currently trying to make a slash command with 4 subcommands: The first creates a new role and adds users within it The second allow to add people in roles...
Ssibv4/28/2024

Can not read dms

I for somereason can not fetch dms sent to my discord bot using 'messageCreate', I have Direct messages and message content as intent as well Discord.js "version": "14.14.1"...
Lloopdelux4/28/2024

where would one find the d.js "send a message in a channel" chain in the v14 docs

sorry if i got the terminology wrong im not super used to JS but where could i find the chain for sending a message in a channel on the docs? traditionally it was message.channel.send but from what i see it ends at message.channel on these docs
No description
Lliveweeebยฒ4/28/2024

ERREUR

[ERROR] DiscordAPIError[50035]: Invalid Form Body
embeds[0][LIST_ITEM_VALUE_REQUIRED]: List item values of ModelType are required
[ERROR] DiscordAPIError[50035]: Invalid Form Body
embeds[0][LIST_ITEM_VALUE_REQUIRED]: List item values of ModelType are required
...
SSwyftey4/28/2024

Is there a way to loop through each guild and channel without getting error using fetch?

Basically, right now I am using try/catch without logging the error(s), because it works. But, if I do not use try/catch, I get an "unknown message" error, even after it does return the correct message and print once.
No description
684/28/2024

Bot cannot play music

I recently started a bot that play music, everything works just fine, no error, the bot is able to find the song and join the voice channel but no music is played. The version i'm using is 14.12.1. Here is my play.js:...
No description
LLolGamer4/28/2024

This interaction failed but components are working

I'm trying to create an interactive settings command by using interactable dropdown menus and buttons. Everything works fine but when I editReply the interaction after the user selects an option, the following edits show an "This interaction failed" message yet everything works just fine. Here's a screenshot and the snippet that's causing the issue...
No description
XXaphy4/28/2024

interaction.channel is null in DM

it works for servers, but not in direct message as 'user app'. I already use as suggestions of others similar questions, but I am not sure what I am missing: ```js const client = new Client({...
Iirukanoko4/27/2024

Discord cdn not working?

I'm storing a link of an image attachment ...cdn.discordapp.com/attachments... and the content is marked as no longe r available. For example, this link works if you paste it in a Disord channel but when you try to fetch this from the browser, it doesn't work. https://cdn.discordapp.com/attachments/1152356454771216415/1232700145414705232/kaedehara-kazuha-6-669.png?ex=662a68f9&is=66291779&hm=d3e48d04010bef93a12f81db2eff0b4fde2edc30eb947325c437715941ef920a& Now all these links I saved can't be fetched and are dead. Is there something Discord changed that I'm not aware of?...
No description
ZHAZeDev (Hades Arc)4/27/2024

this isnโ€™t really an error but more of a question

How would you exactly use the presence to detect if a specific role has online members? as i am trying to make a command that pings people on that role if they are online but i don't understand how presence work
JJ4/27/2024

Slash command Duplicate error!!

i keep getting this error trying to refresh my slash cmds using the command deploy from discordjs.guide code: ```js const { REST, Routes } = require('discord.js'); const { clientId, guildId, token } = require('./config.json');...
AAiwoz[old]4/27/2024

crash even if I have a trycatch

The bot crashes even if I put a trycatch(error).
PP'titeLouise4/27/2024

Trouble with collector and interactions

Here's the part of my code that's causing errors: ```javascript async function handleListReactions(interaction) { //line 237 if (!reactions || Object.keys(reactions).length === 0) {...
TTorrino4/27/2024

What are the exact differences between a Webhook and a Webhook client?

I've read the page on the discordjs.guide but I'm not sure I really understood the difference between the two.
JJordan4/27/2024

Checking if a user is mobiile

```JS client.on('messageCreate', async (message) => { // Check if the user is online and has presence data if (message.author.presence && message.author.presence.clientStatus) { const userIsOnMobile = message.author.presence.clientStatus.mobile;...
โœจ๐“œ๐“ช๐“ฒ๐“ฝ๐“ป๐“ฎ๐“–๐“”๐“”๐“šใƒ„โœจ4/26/2024

Sharding Questions

Hello, As my bot is nearly reaching the 2k servers. I need to prepare it to sharding but I have some questions to that : As I use a system like that :...
Next