Skip to content

Commit

Permalink
add command to prefix commands
Browse files Browse the repository at this point in the history
  • Loading branch information
yorunoken committed Apr 23, 2024
1 parent e84da44 commit 841de72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/commands-message/help/command.ts
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 2 additions & 2 deletions src/commands/help/command.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -18,7 +18,7 @@ export default {
await interaction.deferReply();

await interaction.editReply({
embeds: helpBuilder()
embeds: commandBuilder(interaction.data.getString("name"))
});
}
} satisfies SlashCommand;

0 comments on commit 841de72

Please sign in to comment.