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

Need help with logging system

So I'm working on a bot called "Neonova" that I have made with a logging system built in and I want to log channel permission updates but I'm having trouble doing so. The following attachment is my code. Is there something I'm doing wrong?...

node.js error

i keep getting this error while trying to start my bot i try to do npm install does not work and npm rebuild dont work either so what can i do
No description

Client.user is undefined even at the fired ready event in discord.js v14.18.0

Hello people! I was trying to log that my client is ready and with the name it is logged in, but it is just straight up undefined ```ts...

Bot works but authorization gives errors

My bot code works but for some reason it keeps giving me an error with authentication and the bot refuses to respond to me with this error I would highly appreciate if someone can help me
No description

User leave issue

Hi, I'm making an invite tracking bot for myself, however my leave logic isn't recognising when a user leaves? Originally I thought it may be an SQLite issue, however when adding a debug print statement it doesn't print anything, which is weird because my join logic work and sucesfully prints, could somebody help? ```js client.on("guildMemberRemove", async member => { const db = await dbPromise;...

TextInputStyle not available?

i am trying to create a modal, but im unable to do so because TextInputStyle is not available. does not provide any imports or anything... ```js const favoriteColorInput = new TextInputBuilder() .setCustomId('favoriteColorInput') // The label is the prompt the user sees for this input...

Buttons instantly disappear after using slash command

https://pastebin.com/36riQB8n The code above is my command. The Buttons on the ephemenal message disappear instantly after calling the command....

Cant find module config.json

Why its said Error: Cannot find module './config.json' while i executing deploy-commands.js?

DiscordAPIError[50001]: Missing Access

I am trying to deploy-commands.js but its said Started refreshing 4 application (/) commands. There is no log Successfully reloaded 4 application (/)commands ...

Discord bot error

How can I fix this error

Is there a way to know if someone is connected in voice on xbox or ps5 ?

Is there a way to know if someone is connected in voice on xbox or ps5 ? Or an endpoint in the discord api ?

Re; Server Member Applications

Discord has recently been rolling out the Server Member Applications feature, expanding its original use beyond clans. Article: https://support.discord.com/hc/en-us/articles/29729107418519.
I was wondering if Discord.js currently supports this or if it’s still too early for implementation. Has anyone looked into this yet?...

Unknown interaction, what could be the reason?

I am currently working on a bot that requests an api and then sends it back, the typical one. Everything worked and all interactions worked, but suddenly it stopped working. No interaction, be it commands or buttons, works anymore, the same error message always appears. I thought this could be because the interactions take too long, I tried defer etc. but it didn't help. What could be the reason for that? - discord.js version: 14.18 - node version: v21.7.3 ...

Discord.JS Stats Database

How can I display 1d, 3d, 7d of text & voice channel activity and also the top text & voice channel as shown in the picture. So what I mean is what my database should look like. I use supabase for this and would like to have everything in one database table. I would do it like this. Gladly improvements or ideas: - guild_id INT PRIMARY - user_id INT...
No description

Can `.addChannelOption()` take more than 1 channels as input?

I have a discord bot for creating breakout rooms. It has 2 main slash commands: 1. create breakout rooms (voice channels) 2. move members from the main room to the breakout rooms. I have a problem with the 2nd slash command, which takes 2 input: the main room and the breakout rooms. It seems that .addChannelOption() can only take 1 input, so I have to create multiple .addChannelOption(), which is cumbersome from the user's perspective. (screenshot 1)....
No description

Possible AsyncEventEmitter memory leak detected

Anyone knows why my discord bot throws this errors?

Published announcement channel messages fire messageEdit event (v13)

Hai yall, I'm still migrating my bot to v14 but ive noticed my v13 bot is logging published announcements as edited messages for some reason, has anyone else encountered this issue or is it just the way i wrote it? I'm happy to send my code if necessary :)...

Adding old messages to the cache and making them listen for events like messageReactionAdd

Is this possible? I tried to add manually channel.messages.cache.set(id, message) but it didn't work.