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

`Cannot read properties of undefined (reading 'send')` when fetching guild members

Hi! I got some weird error while fetching the members list of my guild. I believe this is a lib bug, but I want to make sure I didn't miss anything on my side My code: ```js const guild = await this.getClient().guilds.fetch(guildId); const members = await guild.members.fetch();...

Slash Command Question

Is there any way to get more than one options for example in getRole?

Modal Field Not Found (for field that was never on there to begin with)

Hey, This error keeps popping up where apparently it's looking for a field with the custom ID "name," but that's just not what I put on the modal, or anywhere in the file. Yes, I triple (and quadruple) checked that the modal custom ID in the filter is the same. Also, the file stands alone and is not affected by any other code besides the class. I did Discord.js's prescribed way of having dynamic commands, events, et cetera; but put it in classes for more ease (hence the ReadableCommand class)....

Code saying the command doesn't exist

```js client.on(Events.InteractionCreate, async interaction => { if (!interaction.isChatInputCommand()) return; const command = interaction.client.commands.get(interaction.commandName);...

What is the difference between autocomplete and string input options?

I'm kinda confused, how does autocomplete differ from normal string input options? If I understand correctly it is able to give different secondary options compared to the input on the first option? I might be wrong though.

Emitter Not Firing

I'm currently using the voiceStateUpdate event emitter, and I believe I've come across a problem. When a user leaves the voice channel, a new state (event) gets emitted. However, when a user leaves the voice channel while streaming, a new state (event) does not get emitted. Just to clarify, it seems to be registering starting a stream and ending a stream fine. Just the problem above ^^ ...

How can I retrieve messages from a channel with a script

I need to retrieve messages from a channel that only my discord client has access to, my bot does not have access to it

Can you help me?

I'm learning to code a bot, can someone help me, if you're bothered, I'm sorry

Can ho support

I'm learning to code a bot, can someone help me, if you're bothered, I'm sorry

are the isCommand() is isText() etc, functions are going to get deprecated?

i recall seeing this somewhere, but either im going crazy and i can't find it anywhere.

Discord bot not playing audio

Hey everyone, i just created my first discord music bot (or did my best attempt since i'm very new to discord.js or javascript in general.) Everything seems to be working but the bot it doesn't start playing audio when coming into the voice channel. I get no error messages or anything....

Help on code

Hello! New bot developer here! Can someone help me on how to make a level system? I can't seem to figure it out.. And i currently don't have any progress....

Problem with oldMessage

Please tell me what to do. In Events.MessageUpdate oldMessage gives me a message in small letters, although I wrote in caps, but in newMessage everything is as it should be. How can I fix this?

user undefined

I am encounting following error: TypeError: Cannot read properties of undefined (reading 'user') Here is the code: ```js const { SlashCommandBuilder } = require("discord.js");...

Bot works on windows, but not on ubuntu.

I am following the tutorial for slash commands and have copied exactly what is in the documentation. When running the /user command, it works on Windows, but Ubuntu returns an error: ``` DiscordAPIError[10062]: Unknown interaction at handleErrors (/mnt/0EA6F184A6F16C99/100Devs/Practice Projects/role-bot/node_modules/@discordjs/rest/dist/index.js:640:13)...

can someone help me with this doubt

is there any way for me to link the slashcommands with the language of the person disagrees, example command /criar in portuguese, /create in english

500 on editing thread parent interaction reply

Hey there. I'm getting Internal Server Errors when attempting to edit an interaction response that is now the parent message of a thread. The edit still goes through, but the server responds with a 500 nonetheless. The issue only started happening today, so I initially thought it was a Discord-side issue, but nobody else seems to be reporting this issue....

Lightweight PermissionsBitField package

Hey! I want to use the PermissionsBitField class in an API of mine, without having to import all of DiscordJS. I did some searching to see if there was any sort of standalone package for it but wasn't able to find anything. I know it wouldn't be too hard to make from scratch but I wanted to check first to see if anyone knows of an existing package. Thanks!...