From d36ffff109b81dcd2c7e9d2c68b56e62b9a5f242 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Wed, 28 Feb 2024 21:23:06 +0000 Subject: [PATCH] Fix d4all restart command. --- src/appservice/bot/ListCommand.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/appservice/bot/ListCommand.tsx b/src/appservice/bot/ListCommand.tsx index 1d6035ef..deae22d0 100644 --- a/src/appservice/bot/ListCommand.tsx +++ b/src/appservice/bot/ListCommand.tsx @@ -8,7 +8,7 @@ import { MatrixSendClient } from '../../MatrixEmitter'; import { UnstartedMjolnir } from '../MjolnirManager'; import { BaseFunction, defineInterfaceCommand } from '../../commands/interface-manager/InterfaceCommand'; import { findPresentationType, parameters } from '../../commands/interface-manager/ParameterParsing'; -import { AppserviceBaseExecutor } from './AppserviceCommandHandler'; +import { AppserviceBaseExecutor, AppserviceContext } from './AppserviceCommandHandler'; import { UserID } from 'matrix-bot-sdk'; import { CommandError, CommandResult } from '../../commands/interface-manager/Validation'; import { tickCrossRenderer } from '../../commands/interface-manager/MatrixHelpRenderer'; @@ -80,8 +80,8 @@ const restart = defineInterfaceCommand({ description: 'The userid of the mjolnir to restart' } ]), - command: async (context, _keywords, mjolnirId: UserID): Promise> => { - const mjolnirManager = context.appservice.mjolnirManager; + command: async function (this: AppserviceContext, _keywords, mjolnirId: UserID): Promise> { + const mjolnirManager = this.appservice.mjolnirManager; const mjolnir = mjolnirManager.findUnstartedMjolnir(mjolnirId.localpart); if (mjolnir?.mjolnirRecord === undefined) { return CommandError.Result(`We can't find the unstarted mjolnir ${mjolnirId}, is it running?`);