From 7b620dfd90c2439833e785cd572b24fa642c4981 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 1 Jul 2024 19:03:49 +0100 Subject: [PATCH] WIP: Create base moon command --- src/commands/304276391837302787/moons.ts | 27 +++++++++++++++++++ src/commands/304276391837302787/moons/list.ts | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 src/commands/304276391837302787/moons.ts create mode 100644 src/commands/304276391837302787/moons/list.ts diff --git a/src/commands/304276391837302787/moons.ts b/src/commands/304276391837302787/moons.ts new file mode 100644 index 0000000..1556d97 --- /dev/null +++ b/src/commands/304276391837302787/moons.ts @@ -0,0 +1,27 @@ +import { Command } from "../../type/command"; +import { CommandInteraction, SlashCommandBuilder } from "discord.js"; +import ListMoons from "./moons/list"; + +export default class Moons extends Command { + constructor() { + super(); + + this.CommandBuilder = new SlashCommandBuilder() + .setName("moons") + .setDescription("View and create moons") + .addSubcommand(subcommand => + subcommand + .setName('list') + .setDescription('List moons you have obtained')); + } + + public override async execute(interaction: CommandInteraction) { + if (!interaction.isChatInputCommand()) return; + + switch (interaction.options.getSubcommand()) { + case "list": + await ListMoons(interaction); + break; + } + } +} diff --git a/src/commands/304276391837302787/moons/list.ts b/src/commands/304276391837302787/moons/list.ts new file mode 100644 index 0000000..023fa89 --- /dev/null +++ b/src/commands/304276391837302787/moons/list.ts @@ -0,0 +1,5 @@ +import {CommandInteraction} from "discord.js"; + +export default async function ListMoons(interaction: CommandInteraction) { + +}