rocketscience_new
rocketscience_new
DIAdiscord.js - Imagine an app
Created by rocketscience_new on 5/8/2024 in #djs-questions
Error with slash command
I get error addSubcommand(command => command.setName('add').setDescription('Add a reaction role to a message.').addStringOption(option => option.setName('message-id').setDescription('The message to react to.').setRequired(true).addStringOption(option => option.setName('emoji').setDescription('The emoji to react with.').setRequired(true)).addRoleOption(option => option.setName('role').setDescription('The role you want to give.').setRequired(true))) ^ TypeError: option.setName(...).setDescription(...).setRequired(...).addStringOption is not a function at C:\Users\user\Documents\pj2 clan bot coded\commands\utility\reactionroles.js:8:222 at MixedClass._sharedAddOptionMethod (C:\Users\user\Documents\pj2 clan bot coded\node_modules\@discordjs\builders\dist\index.js:2381:50) at MixedClass.addStringOption (C:\Users\user\Documents\pj2 clan bot coded\node_modules\@discordjs\builders\dist\index.js:2353:17) at C:\Users\user\Documents\pj2 clan bot coded\commands\utility\reactionroles.js:8:106 at MixedClass.addSubcommand (C:\Users\user\Documents\pj2 clan bot coded\node_modules\@discordjs\builders\dist\index.js:2504:50) at Object.<anonymous> (C:\Users\user\Documents\pj2 clan bot coded\commands\utility\reactionroles.js:8:6) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) with the code (only one snippet) .addSubcommand(command => command.setName('add').setDescription('Add a reaction role to a message.').addStringOption(option => option.setName('message-id').setDescription('The message to react to.').setRequired(true).addStringOption(option => option.setName('emoji').setDescription('The emoji to react with.').setRequired(true)).addRoleOption(option => option.setName('role').setDescription('The role you want to give.').setRequired(true)))
34 replies