File tree Expand file tree Collapse file tree
apps/draupnir/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " draupnir " : patch
3+ ---
4+
5+ Add meow command as ordered by decree from the feline overlords
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ import {
5353} from "./WatchUnwatchCommand" ;
5454import { DraupnirTopLevelCommands } from "./DraupnirCommandTable" ;
5555import { DraupnirSafeModeCommand } from "./SafeModeCommand" ;
56+ import { DraupnirMeowCommand } from "./MeowCommand" ;
5657import { DraupnirProtectionsShowCommand } from "./ProtectionsShowCommand" ;
5758import { DraupnirProtectionsCapabilityCommand } from "./ProtectionsCapabilitiesCommand" ;
5859import { JoinWaveCommandTable } from "../protections/JoinWaveShortCircuit" ;
@@ -126,6 +127,7 @@ const DraupnirCommands = new StandardCommandTable("draupnir")
126127 "members" ,
127128 ] )
128129 . internCommand ( DraupnirSafeModeCommand , [ "safe" , "mode" ] )
130+ . internCommand ( DraupnirMeowCommand , [ "meow" ] )
129131 . internCommand ( DraupnirDisplaynameCommand , [ "displayname" ] )
130132 . internCommand ( DraupnirSetPowerLevelCommand , [ "powerlevel" ] )
131133 . internCommand ( DraupnirStatusCommand , [ "status" ] )
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+
3+ import { describeCommand } from "@the-draupnir-project/interface-manager" ;
4+ import { Draupnir } from "../Draupnir" ;
5+ import { Ok , Result } from "@gnuxie/typescript-result" ;
6+ import { DraupnirInterfaceAdaptor } from "./DraupnirCommandPrerequisites" ;
7+
8+ export const DraupnirMeowCommand = describeCommand ( {
9+ summary : "The bot responds with Meow." ,
10+ parameters : [ ] ,
11+ async executor ( draupnir : Draupnir ) : Promise < Result < void > > {
12+ await draupnir . client . sendMessage ( draupnir . managementRoomID , {
13+ msgtype : "m.text" ,
14+ body : "Meow" ,
15+ } ) ;
16+ return Ok ( undefined ) ;
17+ } ,
18+ } ) ;
19+
20+ DraupnirInterfaceAdaptor . describeRenderer ( DraupnirMeowCommand , {
21+ isAlwaysSupposedToUseDefaultRenderer : true ,
22+ } ) ;
You can’t perform that action at this time.
0 commit comments