Slash Command Option type 3, expected 4
const { EmbedBuilder, SlashCommandBuilder } = require('discord.js');
const fs = require('fs');
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('Get all command information and the Bots information')
.addStringOption(help => help.setName('name').setDescription('commands|bot-info')),
const { EmbedBuilder, SlashCommandBuilder } = require('discord.js');
const fs = require('fs');
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('Get all command information and the Bots information')
.addStringOption(help => help.setName('name').setDescription('commands|bot-info')),
4 Replies
Error
TypeError [CommandInteractionOptionType]: Option "name" is of type: 3; expected 4.
at CommandInteractionOptionResolver._getTypedOption (D:\PA_Admin Backup\node_modules\discord.js\src\structures\CommandInteractionOptionResolver.js:99:13)
at CommandInteractionOptionResolver.getInteger (D:\PA_Admin Backup\node_modules\discord.js\src\structures\CommandInteractionOptionResolver.js:171:25)
at Object.execute (D:\PA_Admin Backup\Slash Commands\help.js:10:42)
at Object.execute (D:\PA_Admin Backup\Events\interactionCreate.js:18:28)
at Client.<anonymous> (D:\PA_Admin Backup\index.js:55:44)
at Client.emit (node:events:520:28)
at InteractionCreateAction.handle (D:\PA_Admin Backup\node_modules\discord.js\src\client\actions\InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\WebSocketManager.js:352:31)
at WebSocketShard.onPacket (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\WebSocketShard.js:481:22) {
[Symbol(code)]: 94
}
node:events:498
throw er; // Unhandled 'error' event
^
TypeError: "" is not a function
at Object.execute (D:\PA_Admin Backup\Events\interactionCreate.js:24:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:381:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)
TypeError [CommandInteractionOptionType]: Option "name" is of type: 3; expected 4.
at CommandInteractionOptionResolver._getTypedOption (D:\PA_Admin Backup\node_modules\discord.js\src\structures\CommandInteractionOptionResolver.js:99:13)
at CommandInteractionOptionResolver.getInteger (D:\PA_Admin Backup\node_modules\discord.js\src\structures\CommandInteractionOptionResolver.js:171:25)
at Object.execute (D:\PA_Admin Backup\Slash Commands\help.js:10:42)
at Object.execute (D:\PA_Admin Backup\Events\interactionCreate.js:18:28)
at Client.<anonymous> (D:\PA_Admin Backup\index.js:55:44)
at Client.emit (node:events:520:28)
at InteractionCreateAction.handle (D:\PA_Admin Backup\node_modules\discord.js\src\client\actions\InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\WebSocketManager.js:352:31)
at WebSocketShard.onPacket (D:\PA_Admin Backup\node_modules\discord.js\src\client\websocket\WebSocketShard.js:481:22) {
[Symbol(code)]: 94
}
node:events:498
throw er; // Unhandled 'error' event
^
TypeError: "" is not a function
at Object.execute (D:\PA_Admin Backup\Events\interactionCreate.js:24:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:381:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i found the issue
nvm
but it was getInteger() that i put
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View