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

leave (non command)

Get this error when tryna leave server i dont own
No description

Leave (NOT COMMAND)

How do I leave a server through my VSCode if i don't own the server (i have no permissions to kick the bot) and I want my bot to leave their server. Please help

setNameLocalizations

Hello, with the localizations commands, I would like to make my setNameLocalizations clickable, except the only clickable commands that I have are the setName, how I can make my setNameLocalizations clickable, knowing that by putting the id of the setName or setNameLocalizations my command is still not clickable

Embed image doesn't show since couple of days.

I am not sure if it is discord.js problem. My bot once a day posts 3 embeds with images. In 2 of 3 embeds images are displayed correctly, in last embed image is not displayed at all since 5 days. I checked embed source, image url and proxy_url are set correctly, however image width and height is 0. When i open that image url (from not working embed) in the browser it clearly shows image is 560 x 400 px. When i open image from working embed it shows the same thing....

Interaction emitting 2 times

So basically I have 4 buttons (3 for claim) and a reroll button (once an hour). if a user doesn't have enough currency to reroll it should tell him but he can still claim through the other buttons and here come the problem as the reroll button (should be always working not only for 10 minutes). for the 3 buttons i use a collector that works for 10 minutes only but for the reroll i use a the events. when a user reroll it-regenerate the buttons of claim but when trying to claim it run twice

there is way to add options to input in modal ?

everyhting in the question i want a select menu in modal but i saw only possible to have input i saw in the doc there is not options to addoptions or something like this to the input is it way to do it ?

Activities Event

is there an event that listens for the start of activities in voice channels?

Memory leak when sharding

I'm experiencing a memory leak when using sharding in my bot, obviously memory leaks are hard to debug so I just would like some advice on how to diagnose the issue. The bot slowly rises in memory usage up to 2-3 gbs until it runs out of memory. I tried running heap snapshots, but that didn't provide meaningful results. I've tried using discord-hybrid-sharding and without it, with the same results....

thread.members.add is not a function

Hi can anyone help me with this code? code: ```js const { getThreadId } = require('../util/database/getThreadId.js'); const { claimTicket } = require('../util/database/claimTicket.js');...

Per Server Currency System

I know the currency system tutorial exists on the discord.js guide (https://discordjs.guide/sequelize/currency.html#file-overview), but can anyone suggest any ways or tutorials for trying to set one up for a discord bot on several servers? I'm not sure how to go about separating the shop system/database tables, and subsequent djs bot commands for individual servers.

selectmenu dont working

Hi, I'm making a ticket system in discord.js v14, but when selecting in selectmenu, it shows that this action failed and there are no errors in the console (vsc), does anyone know the reason?

What is the best way to detect a change in server ownership when the bot happens to be offline?

Hi, I am using Discord.JS and am trying to figure out how I might change a server in my database's owner_id field when the owner id is found to be different. Here is an example:...

Slash Command Not working

PING COMMAND ```js module.exports.run = async (interaction) => { ...
No description

message event not working

sorry, accidently marked the previous post i made as "resolved" ```javascript import express from "express";...

message event not working

```javascript import express from "express"; import Discord, { ActionRowBuilder, ActivityType,...

TS Bot Handlers not running with correct envs

can anyone figure out why the handlers in this bot is not working? I have provided correct envs. https://github.com/TeaClientMC/Discord-Bot/...

can't set role to user (user.roles.add is not a function)

If I have a code like this ```ts const member = interaction.options.getMember("user"); const type = interaction.options.getRole("type"); member.roles.add(type);...

Button Image

Hello, Is there a way to add an emoji to the button like so: I've been searching for quite a bit on this discord, websites and docs, but I just couldn't find any valuable information that helped me....
No description

How to check server's subscription without API call ?

Is it possible to check the entitlement of a server without having to make a query after each interaction? I search alternative without call that query => https://discord.com/api/v10/applications/123/entitlements...

Locate (multiple) images in post and repost to different channel

I'm able to read the original message, locate the image URL and repost a single image. However, if multiple images get posted, I only return the first URL and corresponding image. I'm stuck... Forgive me if it's something silly, this is my 2nd day using discord.js. Using discord.js v14.16.3 and node v22.11.0. ```const { Client, IntentsBitField, MessageCollector, Collection } = require('discord.js'); const client = new Client({...
Next