Trying to detect if a shard goes offline
I am trying to make it so on shardcreate it gets the client.ws.ping or client.ws.status.
The issue is that when I disconnect my wifi it still returns 0 for the status (same as when its on and connected), and the ping remains frozen at the last value (Not switching to -1 like I would expect)
Here Is the code(I am using express to send a thing based on if its running or not):
Also again client.ws.status cant be compared to WebSocket.OPEN since its always 0
```ts...
InteractionResponse#awaitMessageComponent is not working with modal
https://gist.github.com/danthonywalker/c369f391b8524388866ac9a74f4e9e44
So the flow goes like this
1)
showQuestionModal is called, which displays the modal and handles submission logic
2) let response = modalInteraction.reply is called, which contains buttons...How do I remove a role from a member
I've been able to add a role this whole time. But I can't seem to remove it. It always gives me an error, says I don't have permission. But the bot is admin.
Is the function still member.roles.remove(role) ? Or is that my mistake...
More concise way to edit sent embeds
I am currently dealing editing the fields of an existing embed as a reply, where I'm only changing the fields and not the base content. However, so far the only way I've seen to edit embeds is to redefine the entire embed. I tried making a
baseEmbed which only containts setTitle(), .setDescription etc, and using .addFields() for the editable content. However, .addFields() mutates the existing embed rather than making a new one and as such it simply keeps adding new copies of the fiel...How do I send Discord Embed?
I have a code that sends Discord Embed however does not see the MessageEmbed namespace what could be wrong?
```js
// Import the necessary modules
const { Client, IntentsBitField, Partials, MessageEmbed } = require('discord.js');
...
How do I get the bot to respond to DM messages that are written to it from the user?
I still can't find an example where there is an event that would trigger whenever a user writes a message to a bot in the DM
Can't Disable EmbedBuilder Validators
I'm still getting validation errors for EmbedBuilder after using disableValidators()

Best way to take a second argument for slash commands?
It pretty much is all explained in the title. I have working slash commands, but I would like to take a second argument with the slash command.
Events vs Audit Logs
What is the preferred way to log actions happening in a guild ? For example if I want to log when a channel is created, should I use
Events.ChannelCreate or AuditLogEvent.ChannelCreate ?.setColor() doesn't work for me
I'm using EmbedBuilder to .setColor("#3dfbff") and it's not working, I'll give you the code in one sec
peoples my bot, dont work. Event 'messageCreated' the bot return nothing
const { token } = require('./token.json');
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [...
How to get first message in thread/channel?
Tried different methods:
```typescript
(await thread.messages.fetch()).last() // Goes back maybe 50 messages
(await thread.messages.fetch({limit:1})).last() // Gets most recent message (last is actually older, tried with first() too)...
Message collector not working in thread
On discordjs 14.11.0. I cannot get a message collector to work in threads despite having no issue with other collectors such as for components. I've confirmed the thread is valid, as I can send messages to the thread using the same handle at the same point in the code. I have tried to log every event the collector triggers and I get a big load of nothing in the console, but it appears to instantiate correctly.
```typescript
const collector = thread.createMessageCollector();
...

Typescript build failure
Hello,
using Typescript 5.1.6 and a one-liner index.ts that imports (version 14.12.1) discord.js, I get two compiler errors from the typings of the library:
```js
node_modules/discord.js/typings/index.d.ts:3852:14 - error TS2536: Type 'T' cannot be used to index type 'MappedChannelCategoryTypes'....
Shards are dying and re spawning again nd again
Logs:
```console
8|Raiden Bot | [Raiden] Bot has been launched!
8|Raiden Bot | 16:48:38 >> [WS => Shard 1] First heartbeat sent, starting to beat every 41250ms
8|Raiden Bot | 16:48:38 >> [WS => Shard 1] Heartbeat acknowledged, latency of 19ms....
Bots setting Vanity
Is it possible to use just an endpoint to set the vanity via a command on a bot, or is there a built in feature to djs to enable this function?

