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

Why hosting the script on server won't work but locally it works without problem

if (!targetChannelId) { console.error(No target channel mapping found for category: ${category.name}); await interaction.reply({ content: "There was an error processing your request. This category does not have a designated request channel.", ephemeral: true }); setTimeout(async () => { await interaction.deleteReply().catch(console.error);...

How to set two main images in an embed

Can someone provide some example code as to how you would set two main images as discohook allows you to as long as the url in the body section is set as shown in the image.
No description

Using <GuildsAPI>.getMembers() to fetch specific members.

Can multiple users be fetched using this method or do I have to fetch all the users seperately using <GuildsAPI>.getMember() instead? Using +-- @discordjs/[email protected] +-- @discordjs/[email protected] +-- @discordjs/[email protected]...

LOOKING FOR ANYONE WHO WILLING TO TEST MY NEW BOT TO THEIR SERVER

Hi im currently making a moderator bot with ticket system, lookimg for someone to test my bkt. DM ME

Embed Field Emojis too long

Hey ! Emojis are really really long , taking a lot of character each time you use one. I want to put a lot of emojis in a embed field. However, it increases a LOT the total character count and thus make it impossible. Is there a fix / workaround for this ? Thank you !

how do i grab the role made by an integration

i need to know how to grab the role id that a bot makes when it joins a discord (e.g the dyno role that dyno makes when it joins)

Select Menu you can type in?

Im curious what this is i thought you couldnt type in select menus at all, im trying to emulate but no luck.
No description

Issue with Message Logger

Hey, for some reason this code always sets the message recorded in the embed to 'No content' any idea why? ```js client.on('messageCreate', async (message) => { if (message.author.bot) return; ...
No description

new Client VS new REST + new WebSocketManager

I'm confused. I've read the guide but I see competing examples. Should I use : ``` // Create REST and WebSocket managers directly const rest: REST = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN);...

Issue with bot connect to gateway through docker network

Hi there, since my last check, I've encountered an issue for the first time today: my bots—each running as a Docker container on a dedicated Docker network (configured with the bridge driver and not marked as internal)—can no longer connect to the gateway. Have there been any changes on your end that might be causing this, or is it a Discord-related problem? The debug logs are: ``` Debug: Provided token: **.**.**...

how to use emoji in bot

I want to use an emoji registered on my Discord bot in Discord.js, but I don't know how to do it.
I've tried using:
```js client.emojis.cache.get('1336990634573172747')...

Issue wth js

```js const { token } = require('./config.json'); const {Client, Events, GatewayIntentBits, SlashCommandBuilder, InteractionCallbackResponse } = require('discord.js') const fs = require('node:fs') ...

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?