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

[TS] how come .send doesn't exist?

client.guilds.cache.get('asdsda')?.channels.cache.get('asd')?.send()
client.guilds.cache.get('asdsda')?.channels.cache.get('asd')?.send()
dont mind that the string fields are asdsda, the only error im getting as of now is that channel.send does not exist at all...

Problem with my slash-commands.js

Why am I getting this error (DiscordAPIError[20012]: You are not authorized to perform this action on this application) while running slash-commands.js? slash-commands.js: ```js const { Client, ApplicationCommandOptionType, REST, Routes } = require('discord.js')...

Discord.js Visual Studio Code Extensions

Looking for someone to guide me on the best extensions to have installed before starting development.

Hey problem w my embed

i have a problem w my embed, the command dosnt work at all, if anyone know why it would be great to help me a little bit. Im sorry if i take a long time to answer, im working and doing others stuff by side! thats the entire code here :...

TypeScript .getSubcommand() issue

Hello there. I'll make this as short as possible. I am starting to port over my code to TypeScript for the sake of making my development process much faster and save myself from unecessary bugs. While porting over my base classes, I came across an issue. For some reason, the .getSubcommand() function is highlighted red. Not sure what I can do. A picture of what I'm talking about is attached. I'll send the code in another message since I don't have enough space here. Thank you for your time and...

Is it possible to get the last message of a guild member?

This is what I found but it doesnt seem to work:
const content = user.lastMessage.content;
const content = user.lastMessage.content;
I think its an outdated way but I dont know the latest way.

file

can a discord bot retrieve files from a chat?

send a message to random channel on join

if my bot has permissions, how can i make it so that it sends a message to a random channel when joining a server?

Giveaway code

I'm not fully sure if this is the right place to place it but lets try; In the file is my code for the giveaway part of my bot. The only problem is that the buttons to join are not working correctly. The error I receive in discord is: "The interaction did not work"...

CommandInteractionOptionResolver broke since updating to v.14.12.1

Hey, did they change something to the OptionResolver? I looked at the changelog but can't seem to find anything.. however since I updated fetching the command options no longer works

Embed images no longer loading

```javascript const embedVar = new EmbedBuilder() .setTitle(title) // .setDescription(description) .addFields(...

broadcast eval

If i wanted to use do await this.client.shard.broadcastEval(findMembers, { context: { userId } });, and the function findMembers had a variable called userId i wanted to pass in, whats the correct way of doing it? this is giving me the error that userId isnt defined.even tho userId itself is also defined earlier

How to know who pressed a button?

my command has a button, when someone press it i want to update the message and write here that him pressed the button

having a queue

So im making like a tournament bot. and when you enter the queue for a 1v1 it says 1/2, and when another person joins the queue it says 2/2. But for the first person it wont update the 1/2, anyone know how I can make it update when they click the 1v1 button?

Time of Role Assignment

Is it possible to show when, i.e. at what time a user received a certain role?

Problem updating to v14.12.0

Today in the release of v14.12.0 I updated my bot's package which is written in typescript, now it doesn't compile anymore

guildAvailable

What doing 'guildAvailable' event in client?

Hesitation between two microservice architectures

Hello, I'm wondering if there is a limit to the number of connections that can be made to the Gateway. Let's say I want to use sharding, I have 20 microservices, and each one needs to be able to listen and send events. Can each microservice create a connection to the Gateway, or is there a limit? I have two architectures in mind. In solution A, a single microservice handles the Gateway connection, but in this case a message broker is required. In solution B, each microservice connects to the Gateway and does not depend on another microservice, however, I guess that in this solution, each microservice will have higher CPU/RAM usage. You can see the schemas of the two solutions in the image....

Slash command not executing

My command doesn't seem to want to execute