skip to Main Content

Javascript – can anyone make this command simpler

This is an embed builder discord.js v14 can anyone make it simpler ?? const { SlashCommandBuilder } = require('@discordjs/builders'); const { EmbedBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('embed') .setDescription('Send a message in an embed') .addStringOption(option =>…

VIEW QUESTION

Javascript – DiscordAPIError: Invalid Form Body 11.options[0]: Field "type" is required to determine the model type

Trying to add a subcommand with SlashCommandBuilders i get this error. FULL ERROR(very long): throw new DiscordAPIError(data, res.status, request); ^ DiscordAPIError: Invalid Form Body 11.options[0]: Field "type" is required to determine the model type. at RequestHandler.execute (C:UsersstixyDocumentsBD-1node_modulesdiscord.jssrcrestRequestHandler.js:350:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)…

VIEW QUESTION

Javascript – TypeError: Cannot read properties of null (reading 'commands')

I've almost fixed my bot and now its giving this error :- /Users/roopa/Desktop/projects/LLbot/src/handlers/commandHandler.js:27 client.application.commands.set(commandsArray); ^ TypeError: Cannot read properties of null (reading 'commands') at loadCommands (/Users/roopa/Desktop/projects/LLbot/src/handlers/commandHandler.js:27:24) at Object.<anonymous> (/Users/roopa/Desktop/projects/LLbot/src/bot.js:274:1) at Module._compile (node:internal/modules/cjs/loader:1255:14) at Module._extensions..js (node:internal/modules/cjs/loader:1309:10) at Module.load (node:internal/modules/cjs/loader:1113:32) at Module._load…

VIEW QUESTION

Javascript – Error: ENOTDIR: not a directory, scandir './src/functions/.DS_Store' What is this and how to fix it

node:internal/fs/utils:351 throw err; ^ Error: ENOTDIR: not a directory, scandir './src/functions/.DS_Store' at Object.readdirSync (node:fs:1532:3) at Object.<anonymous> (/Users/roopa/Desktop/projects/LLbot/src/bot.js:43:6) at Module._compile (node:internal/modules/cjs/loader:1255:14) at Module._extensions..js (node:internal/modules/cjs/loader:1309:10) at Module.load (node:internal/modules/cjs/loader:1113:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { errno: -20, syscall:…

VIEW QUESTION
Back To Top
Search