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

Discord Bot broken

Does anyone know what the issue is and how I can fix it?
No description

buffering timed out after 10000ms

please help its showing me this how to fix all of this...
No description

integrating modal and context menu

how do i get the text input field value from a modal and pass it to a context menu interaction which raised that modal?

how do i send a private message via @discordjs/rest

Sorry i couldn't find any route for that

Using napi-rs canvas library and failing to troubleshoot consistent memory leak on a file

The handleBoosterInfo function is holding onto memory consistently and not letting go. I have tried manually putting in garbage collectors, using pools, weak refs. nothing seems to be working. This library (napi rs canvas) is surely not the problem. Everything else on my bot is perfectly fine. It's just this one command that, when run, consistently pushes memory up and up https://codefile.io/f/83QSMuj0QN...

error when trying to add a button to a message

heya, i am trying to make an application system for my discord server. i am trying to add an action row with buttons, but i keep getting the same error no matter what i do. here is my code: ```js const row = new ActionRowBuilder<ButtonBuilder>() .addComponents(...

Retrieve the author of a voice disconnect

Hello, After a lot of trouble, tests of all kinds, I still can not determine if a user was disconnected by someone, or if he just left by himself. I sometimes come across promising results, but after doing 10 and more tests in all directions, I end up seeing the flaw and detecting a disconnect by someone else when it is a self-deconnection. Do you have any ideas on how to proceed? Thank you in advance...

Cheapest way to do persistent, modifiable memory in real time without a database?

I'm using a small bot for just me and someone else for TTRPG shenanigans, and I want to track things like enemies in an encounter and what items we have equipped. It looks like the main solutions are a whole SQLite database or manually updating the .json; the json is simpler and better scaled for what we need, but it still seems kind of jank due to needing to constantly update the file. Does anyone have a smoother solution than what I've mentioned, or should I just go with updating the .json?

Strange role tagging @everyone

I keep getting this strange @@ only in my everyone tag, can someone help me?
No description

Help Needed with Discord Bot Error: Token Unavailable to Client

Hello, I’m encountering an issue with my Discord bot script. The bot logs in successfully but fails to send a message to a designated channel, resulting in the following error. Details:...
No description

Welcome message

I've created a welcome command that i can do /welcome channel and then in that channel everytime someone join the server there should be send a welcome message with an emebed, when someone joins it doens't work, so when i run the command it says: "Welcome messages will now be sent in generale" but then when someone joins he doesn't. welcome.js: ```js const { SlashCommandBuilder, EmbedBuilder, ChannelType, Client, GatewayIntentBits } = require('discord.js');...

Max Event Listeners

Hello, quick question. In my discord bot, I have several modules where some of them use a seperate ready event file. I'm now experiencing an issue where I reached the max amount of listeners, but I really do need the seperate ready event file for organization. If I decide to continue with the ready event file, is there a way to set the maximum listeners to around 12, instead of the default 10? Also, would that be bad for the bot, or would I be just fine? Thanks in advance!...

discord dashboard and discord js combo

What i normally do is, i got a protect middleware that runs on each request. What does the middleware do? - it checks if JWT is present in cookie...

how can I fix my bots latency?

How can I improve my bots latency, it’s averaging about 600ms and it would be nice to be lower (sometimes goes up to 5000ms) I’m using Ethernet on an extender

interaction.channel.guildId undefined after ephemeral reply

Hello, I've been having an issue since updating my script to v14.16.1. The issue seems to be that responding to interactions with ephemeral messages can sometimes cause the guildId of the channel in the cache to become undefined. It does not happen every time, but usually occurs within 1-3 interactions. I have not been able to reproduce the error without the DirectMessages intent and Channel partial, even though the interaction is from a guild channel. The bot is installed in the guild and can view the channel. I'm thinking this is a bug, but if not, can someone explain why the behavior seems inconsistent? Thanks in advance....
No description

permission to list members of server

permissions to enable to be able to fetch all members of a server

Do we use the new discord emoji the same way as emojis

Do we use the discord emojis the new thing they added to the developer portal as a regular emoji or a different way

guild.members giving only 1 member and the bot itself

Guild.members gives only one member and the bot itself and when another member sends message and api call is made again to fetch members this new member is discovered.

Message to embed

I am trying to make a command that takes raw json as a message and converts it into an embed. I'm not sure how to get the parsed json object as an embed. If anyone could help that would be amazing.
const message = interaction.options.getString('json', true)

const json = JSON.parse(message)
const message = interaction.options.getString('json', true)

const json = JSON.parse(message)
...

lost "view message history" function after receiving new role in community

Our community has 4 roles. - Initial: I had 2 roles: A and B (knowing that A < B, B has more functions and includes functions in A) - Then I was removed role A, then given role B only But somehow I cannot view history messages. What's wrong? I could not identify the problem, although my role has been assigned "view history messages". There are some channels I cannot view, while the others I can. But my role is the highest role and can view all channels. So what's wrong here? Appreciate your comments!...