From 841de724e87bf8ddc8152d4683085ece28958f61 Mon Sep 17 00:00:00 2001 From: Yoru Date: Wed, 24 Apr 2024 02:40:59 +0300 Subject: [PATCH] add `command` to prefix commands --- src/commands-message/help/command.ts | 13 +++++++++++++ src/commands/help/command.ts | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/commands-message/help/command.ts diff --git a/src/commands-message/help/command.ts b/src/commands-message/help/command.ts new file mode 100644 index 00000000..9e9714d8 --- /dev/null +++ b/src/commands-message/help/command.ts @@ -0,0 +1,13 @@ +import { commandBuilder } from "@builders/simple/command"; +import type { MessageCommand } from "@type/commands"; + +export default { + name: "command", + description: "Get info about commands.", + details: "use `name: commandname` to gain information on a specific command.", + usage: "/command", + cooldown: 1000, + run: async ({ message, args }) => { + await message.reply({ embeds: commandBuilder(args[0]) }); + } +} satisfies MessageCommand; diff --git a/src/commands/help/command.ts b/src/commands/help/command.ts index 750be619..bba88cc6 100644 --- a/src/commands/help/command.ts +++ b/src/commands/help/command.ts @@ -1,4 +1,4 @@ -import { helpBuilder } from "@builders/index"; +import { commandBuilder } from "@builders/simple/command"; import { ApplicationCommandOptionType } from "lilybird"; import type { SlashCommand } from "@type/commands"; @@ -18,7 +18,7 @@ export default { await interaction.deferReply(); await interaction.editReply({ - embeds: helpBuilder() + embeds: commandBuilder(interaction.data.getString("name")) }); } } satisfies SlashCommand;