Property 'cmds' does not exist on type 'Client<boolean>'
It's my first time using TypeScript with discord.js & express, I used some of my JS knowledge and it is causing an error now. (if it isnt fixable then what would be the best way to approach slash command handlers on TypeScript)
```
C:\Users------\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);...

Error when creating embed
I'm getting the following error when trying to create an embed. My main goal is to let the user enter the name, select an image and unix time to create an embed.
```[29.07.2023 16:56.55.954] [ERROR] Error creating embed: Received one or more errors
[29.07.2023 16:56.55.955] [ERROR] Error details: CombinedError (3)
Received one or more errors...
i need js code for my bot status
i need discord.js code for status of my bot like Watching My DMS
my js version is 13.6.0...
Select Menu Question
I want to create a select menu ticket with modal is there any way to update the menu and show modal too?
Discord.js Old Theme
Whats the theme used in the old discord js website? I don't know if it's custom or not but i have saw a website that has the same theme

Help with collection filter
I am trying to filter out threads which has been locked or archived, but it just return the whole collection back.
```js
const forum = await client.channels.fetch(channel);
let threads = forum.threads.cache;
......
Question regarding GuildMemberAdd and GuildMemberUpdate
So my bot currently detects people who donate when they obtain the Premium role in my Discord server. However, I've came to notice (for a while now) that when they join and already have the role appended to them, it doesn't fire GuildMemberUpdate (or at least my bot doesn't detect it). People pledge to us on Patreon and then it gives them the role on Discord, but if they're not in the server, it usually lets them join and also instantly gives them the role. My question is; is this event not fired because it would only fire GuildMemberAdd instead of GuildMemberUpdate?
If so, would I then use GuildMemberAdd to obtain the roles they joined with since GuildMemberUpdate isn't being fired?...
many many errors
the code:
```const { ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { ActivityType } = require('discord.js');
...
error 405 method not allowed
these are my codes ( and the file name is 'register-commands.js' )
```js
require('dotenv').config();
const { REST, Routes } = require('discord.js')...
Rest returns 404 error
This might be because I'm doing something wrong, but when I try to use the rest api option I get a 404 error (this happens with every route). However if I use fetch I get back the actual result. I'm setting a token (I assume setToken sets the token on the Authorization header, other wise I would get an 401 error instead).
```
import { REST, Routes } from "discord.js"
...
Channel Select Menu doesn't seem to function?
Why is this erroring:
``js
const addChannelSelectMenu = new ChannelSelectMenuBuilder({
custom_id:
add_team_channels`,
})...How to do something like that?
HI all, I am newbie here, recently found your lib.
I want to build a self-bot which will put a reactions on messages once they will appear in certain channels, is it possible to do that? Can you give me some hints?
Thanks!...
[CLOSED] A question regarding discord.js with types. (TypeScript)
Hi! I'd have a question for the typescript users here. My commands can be run by the (This is because inter.options is not available when the interaction is a normal message)
Now with typescript: I destruct the arguments this way since they can be of type Now I can't get the argument the same way since "options" is declared this way in the discord.js module: Now typescript tells me that ...
InteractionCreate
and messageCreate
event as well. Let me try to explain it. Since they can be a normal text message(with a prefix) or a slash command as well I have to get the arguments the following way (using plain javascript): js async execute({ inter, args }) {
const testArg = inter.options?.getString('testarg', true) || args[0];
js async execute({ inter, args }) {
const testArg = inter.options?.getString('testarg', true) || args[0];
CommandInteraction
(when using InteractionCreate
) and of type Message
(when using messageCreate
) ts async execute({ inter, args }: { inter: CommandInteraction | Message, args: string[] }) {
ts async execute({ inter, args }: { inter: CommandInteraction | Message, args: string[] }) {
inter.options
only exists on CommandInteraction and not Message
as well. So I have to check if the interaction is instanceof CommandInteraction
just to get the options property. ts (inter instanceof CommandInteraction) ? inter.options.getString('testarg', true) : args[0];
ts (inter instanceof CommandInteraction) ? inter.options.getString('testarg', true) : args[0];
ts public options: Omit< CommandInteractionOptionResolver<Cached>, // ... | 'getString' | 'getChannel' | 'getBoolean' >;
//CommandInteractionOptionResolver looks like this
export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType> { // ... public getString(name: string, required: true): string; public getString(name: string, required?: boolean): string | null; // ...
ts public options: Omit< CommandInteractionOptionResolver<Cached>, // ... | 'getString' | 'getChannel' | 'getBoolean' >;
//CommandInteractionOptionResolver looks like this
export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType> { // ... public getString(name: string, required: true): string; public getString(name: string, required?: boolean): string | null; // ...
Property 'getString' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused" | "getMentionable" | "getRole" | "getAttachment" | ... 6 more ... | "getSubcommand">'
So I tried casting the inter.options property to type CommandInteractionOptionResolver
like this which works fine: ts (<CommandInteractionOptionResolver>inter.options).getString('testarg', false)
ts (<CommandInteractionOptionResolver>inter.options).getString('testarg', false)
how to make this concept work?
i'm trying to make a command where i can set the bot's status & then choose the playing/watching/listening etc type in a select menu, & here is this attempt:
```const { ComponentType, ActivityType, ActionRowBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, SlashCommandBuilder } = require('discord.js');
module.exports = {...
create context menus
I get no error, but no context Menus are created after start the bot:
```javascript
…
const rest = new REST({ version: '9' }).setToken(TOKEN);...
Bot get crash if import external list with/without async
My Code
embeds.js: https://pastebin.com/k6j32mSM
lang_parser.js: https://pastebin.com/qsM14GiF
Fragment from utils.js: https://pastebin.com/Gw3ZgFnR...
Question about v0.6.0
The next version of DiscordJS documented at https://discord.js.org/docs/packages/core/0.6.0 will be the v15 or it's a complete brand new package that will be the stable in the future?