diff --git a/.changeset/lucky-papers-happen.md b/.changeset/lucky-papers-happen.md new file mode 100644 index 00000000..9ea1dc65 --- /dev/null +++ b/.changeset/lucky-papers-happen.md @@ -0,0 +1,5 @@ +--- +"draupnir": patch +--- + +Add meow command as ordered by decree from the feline overlords diff --git a/apps/draupnir/src/commands/DraupnirCommands.ts b/apps/draupnir/src/commands/DraupnirCommands.ts index e4ee6903..12334175 100644 --- a/apps/draupnir/src/commands/DraupnirCommands.ts +++ b/apps/draupnir/src/commands/DraupnirCommands.ts @@ -55,6 +55,7 @@ import { } from "./WatchUnwatchCommand"; import { DraupnirTopLevelCommands } from "./DraupnirCommandTable"; import { DraupnirSafeModeCommand } from "./SafeModeCommand"; +import { DraupnirMeowCommand } from "./MeowCommand"; import { DraupnirProtectionsShowCommand } from "./ProtectionsShowCommand"; import { DraupnirProtectionsCapabilityCommand } from "./ProtectionsCapabilitiesCommand"; import { JoinWaveCommandTable } from "../protections/JoinWaveShortCircuit"; @@ -128,6 +129,7 @@ const DraupnirCommands = new StandardCommandTable("draupnir") "members", ]) .internCommand(DraupnirSafeModeCommand, ["safe", "mode"]) + .internCommand(DraupnirMeowCommand, ["meow"]) .internCommand(DraupnirDisplaynameCommand, ["displayname"]) .internCommand(DraupnirAvatarCommand, ["avatar"]) .internCommand(DraupnirSetPowerLevelCommand, ["powerlevel"]) diff --git a/apps/draupnir/src/commands/MeowCommand.ts b/apps/draupnir/src/commands/MeowCommand.ts new file mode 100644 index 00000000..9c07c296 --- /dev/null +++ b/apps/draupnir/src/commands/MeowCommand.ts @@ -0,0 +1,23 @@ +// SPDX-FileCopyrightText: 2026 Catalan Lover +// SPDX-License-Identifier: AFL-3.0 + +import { describeCommand } from "@the-draupnir-project/interface-manager"; +import { Draupnir } from "../Draupnir"; +import { Ok, Result } from "@gnuxie/typescript-result"; +import { DraupnirInterfaceAdaptor } from "./DraupnirCommandPrerequisites"; + +export const DraupnirMeowCommand = describeCommand({ + summary: "The bot responds with Meow.", + parameters: [], + async executor(draupnir: Draupnir): Promise> { + await draupnir.client.sendMessage(draupnir.managementRoomID, { + msgtype: "m.text", + body: "Meow", + }); + return Ok(undefined); + }, +}); + +DraupnirInterfaceAdaptor.describeRenderer(DraupnirMeowCommand, { + isAlwaysSupposedToUseDefaultRenderer: true, +});