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

deferReply not working on specific server

Hello. We are running a small hosting service for Discord bots but one of our servers can't execute editReply from DIscord.js. Discord.py works just fine. The bots just stay on "is thinking..." until that eventually times out. After around 35 minutes the console shows an API error "Invalid Webhook Token". ...

msg not sent to thread

```js client.on(Events.ThreadCreate, async (thread, newlyCreated) => { const chl = "1113514934643470456"; if(thread.parentId === chl) { if (thread.appliedTags.includes('1113573160965656576')) {...

sharding across multiple cores

IIRC, Discord.js's native ShardingManager only distributes shards across a single core (as far as v14.11.0 goes). I've looked into Kurasuta, a sharding manager that allows for shard distribution across multiple cores. Can anyone recommend Kurasuta, or a different manager?

'sharding is required' error, with sharding

recently upgraded to the latest version of discord.js. using the default ShardingManager that djs offers, but when I start up my bot, i still spontaneously get errors of "Error: Sharding is required" from the websocket.js file (context: 45 shards, ~104,500 servers, djs v14.11.0, node.js v16.17.0)...

Failed to compileModule not found: Can't resolve 'zlib-sync'

getting this error when just doing
import { Client, GatewayIntentBits } from 'discord.js'
import { Client, GatewayIntentBits } from 'discord.js'
which is weird cause i thought zlib is an optional package

<Collection>#get not documented?

Why is the <Collection>#get method not documented? I would assume its because the documentation generator isnt listing methods from the extended class, but why..? They're still important methods that should be documented. Also why has the documentation changed and now class properties and methods are not shown in a list at the top of the page? This seems an incredibly inefficient and ineffective way to document such an extensive library, https://discord.js.org/docs/packages/collection/main/Collection:Class...

message.channel.parent undefined in forum channel?

I'm getting an error where message.channel.parent is undefined. My intention is to cross-check the forum channel in which a user posts to make sure it's an "allowed channel". Am I not using this correctly to identify the parent forum channel of a new thread?

Unknown interaction for some commands in only one server

I have a bot that is sharded and is in a couple thousand servers and for some reason, in one server whenever a command is run, it shows "Unknown interaction" in the console while for the user it shows "Sending Command..." for a few seconds before updating to "This application did not respond.", I can't seem to figure out why this is happening as it even happens for commands that have deferReply on the first line and the error says unknown interaction right on that first line that defers the repl...

Soundboard

Is it possible to customize the server soundboard using a client yet?

Multiple Interactions from collector

so i made this function, and for some reason i started receiving same events like 3+ times when button being clicked, i have no idea what or why

Role not appearing in category after adding it to permissionOverwrites.

I'm creating this just so that I can separate my issue from the others in the #djs-help-v14. To summarize, my bot creates a role in a function in another file, sends the id to the file that creates the category, and when I create the category, I add it the role to permissionOverwrites, but for some reason, when the category is created in Discord, it does not have the role set in permissions....

inherit roles from a channel

this is my current code, the role is created but the permissions not inherited

Simple questioin

How can I write three minuses in emed and have them not turn into this?

Limit reactions to one per message

discord.js :discord.js@14.11.0 Node: v20.2.0 I'm trying to make a poll bot based on reactions and I'm trying to limit reactions so that each user can only be reacted to one emoji at a time. Currently I have a system that checks if a user is already reacted and if so, removes and new reactions until they remove their original reaction but I'm wondering if a system that would remove the old reaction is instead possible? This is the current system I have for the limiting. ```interaction.client.on("messageReactionAdd", async (reaction, user) => {...

Display all commands in guild a member has permissions on

I cant figure it out guild.commands.cache.filter((c) =>member.permissions )...

Rate Limit

Is rate limit reset based on a specific time or does it depend on when you used the code?