create-command
Add Discord commands to the bot. Use when implementing new slash commands or message commands.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add Discord commands to the bot. Use when implementing new slash commands or message commands.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add new moves to the battle system. Use when implementing attack, status, or support moves for Pokemon.
Add a Pokemon (real or fake) to src/config/pokemonConfig.js with its moves, abilities, rarity, and evolution data. Use when the user asks to add, register, implement, or create a new Pokemon, Pokemon form, or fake/custom Pokemon in the battle system.
Find a Pokemon's Discord emoji string — canonical (e.g. `<:25:1100282072003772457>`) from `pokestar-pk-{n}`, form variants (e.g. `<:483origin:1404654211324448848>`) from `pokestar-forms-1`, or fakemon (e.g. `<:ashpikachu:1109522092283658250>`) from `pokestar-pk-extra` — via Playwright CLI. Use when the user asks for a Pokemon's emoji, emoji ID, form emoji, fakemon emoji, or needs an `<:name:snowflake>` string.
Create an implementation plan before adding one or more Pokemon via the `add-pokemon` skill. Builds Pokemon, moves, and abilities tables with all required inputs, flags unimplemented moves/abilities, and produces step-by-step implementation instructions. Use when the user asks to plan adding a Pokemon, plan a Pokemon batch, or invokes this skill before `add-pokemon`.
Verify Discord bot changes by running the bot and testing commands in Discord via Playwright CLI. Use when the user asks to test, verify, or check bot commands in Discord.
Verify a Pokemon's configuration in pokemonConfig.js by testing its moves and abilities in Discord via Playwright CLI. Use when validating a Pokemon's battle behavior after configuration changes.
| name | create-command |
| description | Add Discord commands to the bot. Use when implementing new slash commands or message commands. |
Files to modify:
src/config/commandConfig.js - Add category (if needed) and command configurationsrc/commands/<category>/<command>.js - Implement the commandFor interactive UI commands: Also refer to the create-deact-element skill.
If an appropriate category doesn't exist, add it to commandCategoryConfigRaw:
const commandCategoryConfigRaw = {
// ... existing categories
yourCategory: {
name: "Your Category",
description: "Description of this category",
folder: "yourCategory",
commands: ["yourcommand"],
},
};
Then create the directory: src/commands/yourCategory/
Add your command name to the appropriate category's commands array:
yourCategory: {
// ...
commands: ["existingcommand", "yourcommand"], // Add here
},
Add your command to commandConfigRaw:
yourcommand: {
name: "Your Command",
aliases: ["yourcommand", "yc"], // First alias is the primary command name
description: "Short description for help text",
longDescription: "Detailed description shown in /help yourcommand",
execute: "yourCommand.js", // File in src/commands/<category>/
args: {
requiredArg: {
type: "string",
description: "Description of the argument",
optional: false,
variable: false,
},
optionalArg: {
type: "int",
description: "Optional argument",
optional: true,
variable: false,
},
},
stages: [stageNames.ALPHA, stageNames.BETA, stageNames.PROD],
exp: 10, // Optional: XP reward
money: 25, // Optional: Money reward
},
| Type | Discord.js Method | Description |
|---|---|---|
string | getString() | Text input |
int | getInteger() | Integer number |
bool | getBoolean() | True/false |
user | getUser() | @mentioned user |
channel | getChannel() | #channel reference |
| Property | Type | Description |
|---|---|---|
type | string | One of the types above |
description | string | Shown in slash command hints |
optional | boolean | Whether argument is required |
variable | boolean | If true, captures remaining args (string only) |
enum | any[] | Restrict to specific values |
Create src/commands/<category>/yourCommand.js:
const yourCommandMessageCommand = async (message) => {
// Parse args from message.content
// Execute command logic
// Send response via message.channel.send()
};
const yourCommandSlashCommand = async (interaction) => {
// Get args from interaction.options
// Execute command logic
// Send response via interaction.reply()
};
module.exports = {
message: yourCommandMessageCommand,
slash: yourCommandSlashCommand,
};
For commands with subcommands (e.g., /party add):
party: {
name: "Party",
aliases: ["party"],
description: "Entry point for party commands",
subcommands: ["partyinfo", "partyadd", "partyremove"], // List subcommands
args: {},
stages: [stageNames.ALPHA, stageNames.BETA, stageNames.PROD],
// NO execute property - parent is just an entry point
},
partyadd: {
name: "Party Add",
aliases: ["partyadd", "pa"],
description: "Add a Pokemon to your party",
execute: "partyAdd.js",
args: { /* ... */ },
stages: [stageNames.ALPHA, stageNames.BETA, stageNames.PROD],
parent: "party", // Reference to parent command
},
Naming convention: Subcommand ID is parentsubcommand (e.g., partyadd, tradeinfo).
See references/ for implementation examples:
pattern-simple-command.md - Basic command without interactive UIpattern-deact-command.md - Command using Deact for interactive UIpattern-args-parsing.md - Parsing arguments from message and slash commandsCommand ID must be alphabetic and lowercase: The config validates that command IDs have no capital letters.
Stages control availability: Only include stages where the command should be active:
stageNames.ALPHA - Development/testingstageNames.BETA - Beta testingstageNames.PROD - ProductionArgument names in slash commands: Use getString("argname") where argname is lowercase.
Variable arguments: Only the last argument can have variable: true.
Enum values: For args with enum, the values must match exactly what users can input.
create-deact-element - Creating interactive UI componentsdeact-component-callback - Handling button clicks and selections