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

threadMembersUpdate doesn't being called sometimes

client.on('threadMembersUpdate', async (oldMembers, newMembers, thread) => {
console.log(thread.name, oldMembers, newMembers)
});
client.on('threadMembersUpdate', async (oldMembers, newMembers, thread) => {
console.log(thread.name, oldMembers, newMembers)
});
...

Discord Rate Limit for Channel Creation

Hey guys! I'm working on a discord tool where some users would be able create a template (template i mean the channels structure and roles, perms etc) and other users would be able setup new servers using these preset templates. I have a concern about rate limits. Does limits apply to bot itself or server? For example if I have 100 members that would like to copy a template with 20 channels, it will be 2000 create channel calls. Is that possible to work?...

Seperate gateway process

Is there a way to seperate the gateway/websocket process? I want to have a separate process for the websocket and bot, so I can restart the bot with no event loss (communication between processes using e.g. redis) Aware of discordeno, bit too advanced/complicated for my use (1 server)...

How to DM users that authorized my app?

I'm making a bot that's only usable in DMs with the bot itself and I don't know how to open these DMs with the user who autherized this bot for themselves. The flow I'm going for is the user adds the bot app and as soon as that happens, I want to send the user a message with instructions. I can't find a way to do this with client.on and I'm kinda lost.

They help me

Hello, good afternoon. Can someone give me a bot to ban and unban users?

How do I make sure my Discord bot stays idle?

I have a discord bot that sets a status to idle when it's ready, but is there a way to ensure it stays idle, and doesn't eventually switch to an online status?

Bot doesnt register new / Command

Okay, I have created a deploy-commands.js with after making it so I dont have to create command folders results in the following code: https://pastecode.io/s/e4zexuod which when I run gives the following output: ``` PS H:\discordtunnelbot> node .\src/deploy-commands.js...

Issues with Entitlements

Hey everyone! I'm having some issues with checking the entitlements of servers. It always displays, that the server doesn't own it. I have also tried some other code snippets. ```js const entitlements = await client.application.entitlements.fetch()...

Unable to run code in production, code isnt running after build

```js ╭─[asus] as himanshu in ~/Projects/cfc-dc-bot-1 using node v23.7.0 on (discord.js)✘✘✘ 00:08:39 ╰─(ノ˚Д˚)ノ npm run start
[email protected] start...

Which errors does discord.js handle and which does it let bubble up?

To give one example, it looks like discord.js handles NotAuthenticated and unexpected close codes but not DisallowedIntents. But I wouldn't have known that if I didn't dig through the source code. And that...

How can i check if a message have an attachment?

And optionally, how can i check if the message is a text-file (and not something like pictures or videos)?

An advanced bot for Discord and I want to eventually mimic it for whats app

Its totally going to disrupt the real estate market, again assuming Im able to get it to do what Im after. Locating and obtaining API's apparently there are a lot of errors in my code and its chaotic according to a pro Discord bot dev. this is from our deploy-commands.js file ...

Can someone answer my question about oauth2?

I'm making a system to recover members, is it recommended to refresh the access_token from time to time or only when I'm going to recover the members? And is there a certain time that the refresh_token expires?

idiot can't figure out how a (ts) bot project should look like

I have attempted to create a bot with the creator however the project structure it produces varies widely from what is in the guide

I cannot see my commands

My index.js is: ``` const { Client, GatewayIntentBits, Collection } = require('discord.js'); const fs = require('fs'); const config = require('./config.json');...

Its not possible to reuse / edit the same reply over and over again?

I reply to an initial Chatinput command with Ephemeral reply including an actionrow with interactive components. After interactions with these i want to edit the reply which is working fine but i then there will be an error because im not doing a new reply. Is there a way to avoid this ?...

HOW I CAN DISABLE CACHE?

I want disable cache: All. Оnly the ones I use...

Internal Server Error

Hello everyone. I am developing an anti-nuke bot. When I try to block the nuke bot, I get an error ```HTTPError: Internal Server Error at handleErrors (C:\Users\tivon\OneDriveДокументи\AntiLink2.0\node_modules@discordjs\rest\dist\index.js:720:11) at SequentialHandler.runRequest (C:\Users\tivon\OneDriveДокументи\AntiLink2.0\node_modules@discordjs\rest\dist\index.js:1128:29) at process.processTicksAndRejections (node:internal/process/task_queues:105:5)...

Multi language Bot

Hey everyone, I’m working on a Discord bot with multiple commands that supports multiple languages. Each server can set its own language, and I need to ensure that commands and other content are displayed in the correct language. Currently, after every relevant action (e.g., an unban), I call deployCommands({ guildId }) to update the commands with the right translations. ...

subtexts no work in descriptions

is it just me or does subtext (-#) not work in descriptions?