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

Super high latency to receive message create event

hello i am using discord-hybrid-sharding with djs-v14 and i seem that have the high latency of the first shard but another shard still normal. The message create event took about 20s to be solved...

need help installing discord.js

its giving the error in image when i try star bot
No description

IDE for mobile

yoo, anyone know and want to create a website which allows to code discord bots?

Inaccurate ping measurement with client.ws.ping

Every time I pull from client.ws.ping, it outputs -1, regardless of the connection I'm on or the speed at which it's running. Is there a reason for this? This has been happening to me for as long as I've been familiar with discord.js (I think since v11)

How to get started with ./,/;-commands

I am making a discord bot for a cult server of mine about bread, and there is a channel in that server where new members ping the person that recruited them. I want my bot to keep track of that and make a leaderboard of sorts, but I do not know how to make the bot do anything besides slash commands. So I want my bot to - Read a new message - Then determine if it is a ping and sent by a user that hasn't ping there before...

fetch users

I'm developing a team system in my Discord bot, where each team can have multiple users. Now I want to create a select menu to remove users who are already in a team. The idea is to fetch these users to dynamically build the menu, but since a team can have many users, I'm pretty sure this will hit the Discord API rate limits. Has anyone faced a similar issue or has suggestions on how to handle this in the best way? I was trying to use interaction.guild.members.fetch by passing an array of users, but this only works for users in the server, which is also a problem....

Syncing messages globally

I am building a bot which has a live "feed" / home page. Any ways I can mass- update the messages of the page globally? Must be scalable and reliable.

ApplicationCommandPermissionManager token

I'm in the process of porting over a bot from djs 13 to 14, (and have also started adding typings). In the ApplicationCommandPermissionManager, when adding a permission, it has a required token field. Is this your bot token? Or another kind? ```ts command.permissions.add({...

Socket.io for React Native

Hello everyone, recently ive been working on a personal project that involves using React Native for the front-end and Flask socket.io in the backend. The backend was originally for another web project of a friend of mine where it was served as a web page via flask; however, i decided i wanted to essentially make it into a mobile app. Furthermore, they served there pages using routes in the backend e.g. @app.route('/'). Transitioning from this type of ui to react native has been hell as I am com...
No description

New developer

Hello! I want to learn JavaScript for make my own Discord bots but i dont know how to start. I want to understand all i need in the beggining. Thank you!...

Component Type Error (TS)

I posted this in the regular help channel but it got buried without a lot of help. I'm running into an odd ts issue with components ``` Property 'type' is missing in type 'ActionRowBuilder<MessageActionRowComponentBuilder>' but required in type 'ActionRowData<MessageActionRowComponentBuilder | MessageActionRowComponentData>'.ts(2322)...

Sharding Help

I want to increase my bot shard count to 2 but it is not working and there is no guide for that Only for auto guide is given ```js const { ShardingManager } = require('discord.js'); const { token } = require('./config.json');...

updating interaction does not reset selected value

Upon selecting a value in a channelSelectMenu I update the interaction with another channelSelectMenu. The value from the first selection is still displayed as selected. Going to another channel and back updates the UI. Is there something I can do?...

Server Tag checker bot

How can you create a bot that checks whether a person has a specific server tag?

Database coded with Djs

I coded my mySQL database with discord.js. After a certain time limit (unsure how long) the connection times out and I'm unsure what to do about it. If anyone can help I appreciate it. Code: ```js require('dotenv').config(); const mysql = require('mysql2/promise');...

Is there an event and/or method to approve and see members that requested to join||

In some servers, members can 'Request to join' trough eg. a guild tag. They'll appear in the members tab. Are there exposed events for when members request to join, and methods to approve or reject said members using discord.js? Or is this not available. Thank you in advance!...

EPIPE after upgrading NodeJs from 16 to 22

Hi, We started getting this error "No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize" a few month ago. Because of it we upgraded all libraries include discord.js(14.11 -> 14.21), discordjs/voice (0.16 -> 0.18), nodejs (16 ->22) and started to get this error ...

Error: Expected token to be set for this request, but none was present

I'm seeing this error popup on my bot where I use @djs/rest, I'm not entirely sure why it happens or when it happens, it sort of just happens out of nowhere. My bot functions normally as usual, and then every once in a while this error will popup (I use serverless btw). Here's the full error if it helps: Error: Expected token to be set for this request, but none was present at _REST.resolveRequest (/app/node_modules/@discordjs/rest/dist/index.js:1367:15) at _REST.queueRequest (/app/node_modules/@discordjs/rest/dist/index.js:1327:46)...

Where can I find projects using discord.js?

I'd love to look through a list of projects using discord.js. Perhaps someone has already built what I need and I can join that project rather than starting a new one. Or perhaps I can learn something from looking through the features that will improve my own project. I realize not everyone will want to be listed, but it would be great to have at least a few "powered by discord.js" examples. I couldn't find any on either the web site or here in Discord....