.vscode/command.code-snippets
{
"Define an InterChat Command": {
"scope": "javascript,typescript",
"prefix": ["command", "discord command"],
"body": [
"import BaseCommand from '#main/core/BaseCommand.js';",
"import { ChatInputCommandInteraction } from 'discord.js';",
"export default class $1 extends BaseCommand {",
"\treadonly data = {",
"\t\tname: '$2',",
"\t\tdescription: '$3',",
"\t};",
"\tasync execute(interaction: ChatInputCommandInteraction) {",
"\t\t$4",
"\t}",
"}",
],
"description": "Create a slash command with a name and description.",
},
"Define an InterChat SubCommand": {
"scope": "javascript,typescript",
"prefix": ["subcommand", "discord subcommand"],
"body": [
"import $1 from './index.js';",
"import { ChatInputCommandInteraction } from 'discord.js';\n",
"export default class $3 extends $1 {",
"\tasync execute(interaction: ChatInputCommandInteraction) {",
"\t\t$4",
"\t}",
"}",
],
"description": "Create a slash subcommand with a name and description.",
},
}