Mentioning commands that have subcommands.
I have a question regarding how to properly mention commands that have subcommands in a bot.
For example, I have a
/status
command, with the subcommands /status bot
and /status api
.
While I understand that this is a Discord-related issue, I am trying to implement this functionality in my bot. I have structured the commands in an array, with each command being an object....how to use @silent (flag 4096) on a deferred interaction reply?
Heya, I'm trying to make a silent message that has to be deferred (because it takes longer to finish). I am using the "flags: [ 4096 ]" approach, I'm not aware of any others. When I just reply to the message, the silent flag is used, but when I use deferReply() - also tried to push { flags } options into it, same results - it doesn't process the flag and the following message (even if it's containing the flag as well) also fails to apply. Any ideas about what could I do to?
[email protected]...
AuditLogEvent.ChannelUpdate getting logs for only 1 channel and not all channels
const guild_channel_update_audit_logs = await new_channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelUpdate, limit: 1 });
const guild_channel_update_audit_logs = await new_channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelUpdate, limit: 1 });
secret
and secret2
, why does the above code only get the logs for secret
and not also secret2
? Is this suppose to happen?...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";...