flohhhhh/sharply-bot · Archived

create-discord-command

Create and update Discord slash commands for this Node.js + TypeScript + discord.js v14 template.

First seen Jul 10, 2026

Installation

$ npx skills add flohhhhh/sharply-bot --skill create-discord-command

Summary

  • Create and update Discord slash commands for this Node.js + TypeScript + discord.js v14 template.
  • Use when the request involves adding a new command, changing command options/subcommands, refactoring command behavior, or fixing command typing/execution in files under src/commands/.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,220 B
  • docs SUMMARY.md 312 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Create Discord Command

Create one command module that exports command and matches the repository type pattern.

Workflow

  1. Confirm requested command shape.
  • Determine command name, description, options/subcommands, and response style (ephemeral/public).
  1. Choose command file location.
  • Use src/commands/<name>.ts for a simple command.
  • Use src/commands/<group>/index.ts for grouped or complex command sets.
  • For complex implementations, prefer barrel-file organization by default: create a dedicated subdirectory and place the command in index.ts.
  1. Implement typed command module.
  • Import command types from discord.js and Command from @/types.
  • Export command exactly.
  • Use SlashCommandBuilder for schema and execute for behavior.
  1. Handle runtime behavior safely.
  • Use MessageFlags.Ephemeral when response should be private.
  • Call interaction.deferReply() before long operations.
  • Wrap non-trivial logic with clear error paths if needed.
  1. Validate and deploy.
  • Run npm run typecheck.
  • Run npm run check.
  • Run npm run deploy-commands (or npm run deploy-commands -- --global when explicitly requested).

Command Template

import { type ChatInputCommandInteraction, MessageFlags, SlashCommandBuilder } from 'discord.js';
import type { Command } from '@/types';

export const command: Command<ChatInputCommandInteraction> = {
  data: new SlashCommandBuilder().setName('command-name').setDescription('Command description'),
  execute: async (interaction) => {
    await interaction.reply({
      content: 'Response',
      flags: MessageFlags.Ephemeral
    });
  }
};

Constraints

  • Use @/ path aliases, not relative imports for internal modules.
  • Keep strict typing; avoid non-null assertions unless required.
  • Keep behavior aligned with src/events/interaction-create.ts command routing.