I am currently utilizing Discord.js version 14.8, which was developed in typescript. Here is a snippet from my package.json file:
"dependencies": {
"@discordjs/rest": "^1.1.0",
"@supabase/supabase-js": "^2.25.0",
"@types/node": "^18.7.14",
"discord.js": "14.8.0",
"dotenv": "^16.0.2",
"express": "^4.18.2",
"fs": "^0.0.1-security"
},
"devDependencies": {
"@types/express": "^4.17.17",
"typescript": "^4.9.5"
},
"overrides": {
"discord-api-types": "0.37.20"
}
I'm running into issues with my /help
command and even regular commands like !help
. Below is the code snippet for the /help
command:
import { SlashCommandBuilder, ChannelType, TextChannel, EmbedBuilder } from "discord.js"
import { getThemeColor } from "../functions";
import { SlashCommand } from "../types";
const command : SlashCommand = {
command: new SlashCommandBuilder()
.setName("help")
.setDescription("Shows bot information")
,
execute: interaction => {
// Code implementation here
},
cooldown: 30
}
export default command
The error message I'm receiving is as follows:
this is the error:
// Error details here
Interestingly, the /ping
command is functioning perfectly fine:
import { SlashCommandBuilder, ChannelType, TextChannel, EmbedBuilder } from "discord.js"
import { getThemeColor } from "../functions";
import { SlashCommand } from "../types";
const command : SlashCommand = {
command: new SlashCommandBuilder()
.setName("ping")
.setDescription("Displays bot ping/latency")
,
execute: interaction => {
// Code implementation here
},
cooldown: 30
}
export default command