Getting ratelimit
Response {
status: 429,
statusText: 'Too Many Requests',
headers: Headers {
date: 'Thu, 07 Nov 2024 12:59:51 GMT',...
Ping
I'm starting over creating a bot, I do have a basic JS knowledge but not too much
The point is that, while reading docs, i saw the client.ws, in whick i can get the bot's ping, but when I execute the code it says "Cannot read properties of undefined (reading 'ws')"...
Any1 knows why usedInvite is always false?
This code runs every ready event: https://pastebin.com/Awhnep0C
This code runs every guildmemberadd event: https://pastebin.com/SAyNWuVV...
Use an application bot slash commands in dms
So basically I can use it anywhere but in dms for some reason
how to add dynamically data from sql to .addchoice()
```js
let serverNames = client.serverNames;
console.log(serverNames) /*
[
{ name: 'CCS', value: '228b5e70-d891-4179-a0db-6fcfc66ff054' },...

Google Cloud Run not logging into the bot
Hello devs,
I am using Cloud Run to run a Discord bot docker image built like this:
```
1. Build...

Read and scrapy an embed
hi , i'm receving an embed from another bot to my discord channel ( my bot is already inside my channel with all permissions), i wanna read and scrape the link inside the embed and send it to my api project , i don't understand how i can do that . i built this code with the help of chat gbt but i haven't a response on my terminal beyond client.once('ready', () => {
console.log(
Bot connesso come ${client.user.tag}
);
});
import { Client, GatewayIntentBits } from 'discord.js';...Loading Files synchronously
Hello!
I am currently making a slash command to load in a txt file and place the lines in an object and then manipulate the object.
Everything in the code is running as expected. There is only just one problem - the execute function for the slash command does not wait for my file to close. The consequence of this is that the object is not ready to be manipulated when the next function is called, and thus crashes the application.
...
Multiple Embeds Being Sent
Hi!
I'm currently working on sending embeds but I'm having an issue where multiple embeds are being sent each time the command is executed.
I'm using v20.17.0 (node -v)
...
Slash commands not being created
I have multiple slash commands that wont be create for some reason, and I have no Idea how to fix it, heres my code that sets it up:
```const { Client, Events, GatewayIntentBits, ActivityType, SlashCommandBuilder } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent] });
client.setMaxListeners(20);...
Obtaining Guild Name Doesn't Seem To Work v13.4.
Hi, I have returned to a year old bot and it seems that a function about getting and listing all guilds isn't detecting any guilds attached. When checked about length it is equal to 0.
The function in question:
```js
module.exports = async (message) => {
...
GuildMemberAdded not working
```ts
import { Events, GuildMember, TextChannel } from "discord.js";
import Event from "../../classes/Event";
import OopsieClient from "../../classes/OopsieClient";
import { prisma } from "../../lib/prisma";...
Stats command returning wrong member count after X hours
``js
const promises = [
client.shard.broadcastEval(c => c.guilds.cache.size)
.catch(error => {
console.error(new Date(),
Error in guild count for shard:`, error);...What is the best way to handle components when they've been timed out?
Hi,
I'm sorry, I've probably asked this question a long time ago but have forgotten the answer as it has been a minute.
What is the best way to go about timing buttons/components out? For example, a 60-second collector is started when a command is ran. When the 60 seconds are up, the buttons either disable or (what I'd prefer) have a different custom ID so that an error reply shows if the ID says the button is disabled....
live updater
i have some commands, and some of them creates embeds, but if the bot created a verify embed, then i update the bot, then the verification process doesnt work anymore, or other embeds, so is there something i can do? for example doing smth in index.js?