import { ApplyOptions } from "@sapphire/decorators"; import { Command, container } from "@sapphire/framework"; import { ApplicationIntegrationType, InteractionContextType } from "discord.js"; @ApplyOptions({ description: "mrrrp mew", }) export class MeowCommand extends Command { public override registerApplicationCommands(registry: Command.Registry) { const integrationTypes: ApplicationIntegrationType[] = [ ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall, ]; const contexts: InteractionContextType[] = [ InteractionContextType.BotDM, InteractionContextType.Guild, InteractionContextType.PrivateChannel, ]; registry.registerChatInputCommand({ name: this.name, description: this.description, integrationTypes, contexts, }); } public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) { const meowVariants = [ "meow", "mew", "mrrow", "mrow", "mrrp", "miau", "miu", "nya", "mya", "mraow", "meowdy", "mrrr", "prrt", "prrp", "mreow", "mweow", "mwow", "mrrah", "mrawr", "myaa", "mrao", "chirp", "chirrup", "trill", "brr", "brrp", "ekekek", "mrrrow", "rawr", "rowl", "yowl", "caterwaul", "purr", "purrr", "prrrr", "rrrr", "mew mew", "squeek", "squeak", "mrrp mrrp", "brrrt", "prrow", "meep", "mrrph", "blepp", "raow", "reow", "mrrup", "mrraah", "mowww", "mao", ]; const suffixes = ["~", "!!", "!?", "?!", "...", "!11", "", "✧"]; const prefixes = ["m-", "", "", ""]; const emoticons = [ ">w<", "^w^", "=^w^=", "ฅ^•ﻌ•^ฅ", "(=^・ェ・^=)", "(=^‥^=)", "ฅ(•ㅅ•❀)ฅ", "₍˄·͈༝·͈˄₎", "(ΦωΦ)", "(=①ω①=)", "~(=^‥^)ノ", "", ]; const wordCount = Math.floor(Math.random() * 15) + 3; const words: string[] = []; for (let i = 0; i < wordCount; i++) { const prefix = prefixes[Math.floor(Math.random() * prefixes.length)] as string; const meow = meowVariants[Math.floor(Math.random() * meowVariants.length)] as string; const suffix = suffixes[Math.floor(Math.random() * suffixes.length)] as string; // sometimes extend the meow with repeated letters const extendedMeow = Math.random() > 0.5 ? meow.replace(/[aeiourw]/g, (m) => m.repeat(Math.floor(Math.random() * 4) + 1)) : meow; words.push(`${prefix}${extendedMeow}${suffix}`); } const content = words.join(" ") + (Math.random() > 0.4 ? ` ${emoticons[Math.floor(Math.random() * emoticons.length)]}` : ""); return interaction.reply({ content }); } } container.stores.loadPiece({ piece: MeowCommand, name: "meow", store: "commands", });