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

Issue with @discordjs/ws sharding

I am trying to use worker threads for sharding just like shown in the docs just in common js instead ts https://discordjs.dev/docs/packages/ws/main This is the code: ```js require("dotenv").config();...

Answer on quoted message for slash commands

Hey, I’m working on a bot using Discord.js and I’d like a Slash Command reply to the message that the user is referencing (the quoted message). Use Case:...

Thread Create - Rate limit?

Good evening, guys! I have a questionβ€”I've already looked through forums and read the documentation, but I haven't been able to find any details on this. For anyone with experience in thread creation, do you know what the rate limits are? From what I've read, Discord isn’t too keen on having 1,000 threads in a server. Based on my tests, Discord blocks the bot from creating threads once it hits 55 threads within 1 minute and 30 seconds. However, if I change the bot token, it continues to work... So, is there an overall limit?...

discordjs/rest

how to fetch all guilds at once? (its returning only 200) ``` export async function getBotGuildsService() { const now = Date.now(); ...

Role Creation Problem

Despite the title, there are actually no error messages at all. I am trying to have my bot create roles on server join (guildCreate), and the really strange thing about this code is that it was actually working perfectly until it just started either only making the first few roles and then eventually stopping short or just not making any roles at all. I suspect I may be getting ratelimited so I decided to wait a full hour before continuing, but I'm still facing the same issue.

user verified age?

any best resources for creating an age verification flow with my bot for new users?

Override addChoices limit

I'm creating a bot to help manage some dead by daylight game information and i need to have the option to select any of the 37 ( and increasing) killers in the game. I know there's a 25 limit to the addChoices method, but i was wondering if there was a way around this? I saw somewhere else here that those choices are just recommendations on what they are typing, so could this be more flexible in a way i just dont see yet? Here's what I currently have for a bit more info.
No description

Why cant i use MessageFlags.Ephemeral in v14.7.3?

Hello Everyone!! I am trying to use MessageFlags.Ephemeral as a flag in interaction.reply like this: ```javascript interaction.reply({ content: "Response!", flags: MessageFlags.Ephemeral });...

User get Issue

I got the issue in the image, I use .cache.get, fetch() but always the same. Anyidea?
No description

Check if user has bot subscription

Hello! I am wondering how to check if a user has bot subscription active

HOW DOES THIS STATUS THING WORK?

How can a discord bot have no status like not be in online, idle, invisible, do not disturb just no status some bots have that and I'm curious how its done.
No description

Help building a cooldown for my slash commands

I need help building a global cooldown for my slash commands, I followed the discord.js guide partially and it somewhat works, although my commands are still sometimes going through, despite the cooldown being active. Any advice would be much appreciated.

how do i make a new command?

I have added it in the app.js command.js and commands.js

Seeking a Solution for Discord Rate Limit Issues on a VPS Running 160 Bots

Hello everyone, good evening, I have a VPS that currently runs 160 bots using discord.js, but I've been facing several issues with Discord's rate limit. Almost every day, Discord blocks my machine's IP for an hour or more. Does anyone know a solution for this rate limit? I haven't found any native way to implement a proxy or something similar. Does anyone have any ideas?...

Nodemon

So I was making a github respiratory for my bot and I renamed the file. I closed VSC and then I opened it back. I tried turning it on using nodemon and got this message
Usage: nodemon [nodemon options] [script.js] [args]

See "nodemon --help" for more.
Usage: nodemon [nodemon options] [script.js] [args]

See "nodemon --help" for more.
Instead of the usual message when you run nodemon. Also, when I mention src/index.js in the terminal, it says its an unknown path even though I mentioned it correctly. I have also saved all so I have no idea what is going on....
No description

trying to create a voice channel in a parent category

I'm trying to make a slash command that when used will create a voice chat and then delete it when everyone leaves. this works fine when creating a channel with no parent category ```ts // Check if this Channel where the command was used is stray if (!interaction.channel.parent) {...

How to properly pass Sequelize table into command handler?

I am sure this is very straightforward and I am just missing the obvious, but I am using the discord.js walkthrough https://discordjs.guide/sequelize/#adding-a-tag to setup a keyword system using Sequelize. I have also configured the event handler and command handler setups as recommended previously in the guide, so all my events/commands are in unique files. The guide shows how to add sequelize data when done all directly in your index.js file, but if I am trying to make it a separate command how do I properly require the sequelize table I defined as "Keywords" in my "ready.js" event handler file when setting up the add command as a separate "keyadd.js" command file? Any help greatly appreciated! Here is my current command file to add the keyword: `const { SlashCommandBuilder, MessageFlags } = require('discord.js');...

Buttons?

Is it possible to add buttons to a message the bot didn't create on discordjs? Im sure there is cause you have utilities like discohook utils that can send a button embed to a webhook so that has to be possible right? I'm pretty sure there is some thing similar in discordpy but im not sure.