import { z } from "zod"; import type { Message } from "@fluxerjs/core"; import { arg } from "@/args"; import { Command } from "@/decorators/command"; import { RequireNonBot } from "@/decorators/guards"; import type { BotContext, ICommand, ParsedArgs } from "../types"; const echoArgs = { content: arg.restRequired(z.string().min(1).max(2000)), } as const; @Command({ name: "echo", aliases: ["say", "print"], description: "Repeats the content of the message", }) @RequireNonBot() export class EchoCommand implements ICommand { readonly args = echoArgs; async execute( _ctx: BotContext, message: Message, args: ParsedArgs, ): Promise { await message.channel?.send({ content: args.content }); } }