discord.js - Imagine a 👻

DIA

discord.js - Imagine a 👻

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

discord payment system / integration w/ tap n go?

Hi wondering if discord-js has payment system bots or api. Possibly integrated with tap n go or a tap to pay type system ?

Attach files with @discordjs/rest

How do I attach files and send POST it to channel message endpoint properly?

Receive webhooks without setting up the server

Is it possible to get webhooks without setting up an extra server, etc.?

Discord.JS Temporary ban

Hello, is the new Discord temporary ban system available on DiscordJS v14?

Error 50013 thrown when giving and removing roles

Heyy so I'm getting started with discord.js and created a command that should give and remove a role depending on whether a user has it via interactions. I think I understand how roles work in discord, but I'm confused as to why I'm getting a permission error. Hopefully someone can help!

Enabling / commands

Hi, I'm trying to enable slash commands on my bot. I set a prefix variable in index.js and the value is "/". However, after 48 hours of having the bot in my server, the bot commands don't show when typing /. Is there a different way of coding this that could help?

Mysterious modal error that's got everyone puzzled: Cannot properly serialize component type:

I am using discord.js@14.13.0. I copied this example from discordjs.guide, and simplified it a bit, though the error happens regardless: ```js const modal = new ModalBuilder() .setCustomId('myModal')...

giveaway bot

Tại sao số lượng người tham gia không được thay đổi?

How to close scene?

so createStageInstance creates a scene, as I understand it now, how do I close it, I disconnect the bot via connection.disconnect(), however, the scene does not close, as I understand it, I need to send an empty topic to the createStageInstance channel or which method to call?

Optimizing Image Processing, Storage, and Strategies to Prevent Alts and Botting: Seeking Advice

Hello everyone! I'm seeking insights on optimizing image processing for my application, focusing on simple image editing tasks like overlaying pictures. Currently, I'm using the Sharp package for this, but I'm open to considering other approaches. I would greatly appreciate any advice on the best practices for efficient image processing. I'm debating whether to store image links in my database or utilize a CDN, talking about thousands of images. If you have experience with either approach, I'd l...

Why isn't my bot restarting?

It returns error, however it doesn't log it in console as im using PM2. Full code: https://pastebin.com/7jxNL0YS...

Is it possible to make a bot that opens the stage and starts performing?

Is it possible to immediately make the bot connect to the scene by ID and immediately open the scene with the specified name?

Fetch the user who deleted the message

As the title mentioned, I'd like to know if there's a way to do that through onMessageDelete

Use `client` in multiple files?

Hi! I'm pretty new to d.js but have a question regarding whats common practice. I define my client in index.js, but now I need to interact with the client from a different file. What's the best way to do this? I assume I shouldn't/can't define client two times

How to `update() ` the same interaction multiple times?

So I have this simple slash command that sends 3 buttons: hello, hi, and wassup ```js async function execute(interaction) { const hello = new ButtonBuilder() .setCustomId('hello')...

getting message.author esque information

weird question i know, probably phrased weirder too, but I'm trying to get this information in the screenshot im sending without doing anything like message.author etc, i want to know if i can do it without a message.author, or without the user typing the command pinging that person and then doing message.mentions.users.first etcetc, my goal is to extract the information from a specific user without mentioning them when typing the command

I don't understand what's going on

I'm trying to create a slash command, but every time I try I get the error shown in the screenshot below. Discord.js version: discord.js@14.13.0-dev.1692230961-24fbb11ba.0 Node.js version: node@18.17.0 ...
error

DiscordAPIError[50035]: Invalid Form Body

``` const menu = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents( new StringSelectMenuBuilder() .setCustomId('ranks-menu') .setPlaceholder('No ranks selected...')...

throw er; // Unhandled 'error' event

how can i solv this? node:events:492 throw er; // Unhandled 'error' event ^...

Is it possible to send a message later so that it is sent as if it was sent by the user?

for example, when sending a message from the bot message.channel.send , change the avatar and nickname somehow and send ```js async function sendMessageAsUser(channel, content, username, avatarURL) {...