From 35115bb46194b6df614802e048955baec007f448 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Fri, 23 Jun 2023 11:12:24 +0200 Subject: [PATCH] Add missing parameter descriptions --- src/appservice/bot/AccessCommands.tsx | 2 ++ src/appservice/bot/ListCommand.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/appservice/bot/AccessCommands.tsx b/src/appservice/bot/AccessCommands.tsx index 25f96d3a..6854c50a 100644 --- a/src/appservice/bot/AccessCommands.tsx +++ b/src/appservice/bot/AccessCommands.tsx @@ -18,6 +18,7 @@ defineInterfaceCommand({ { name: 'user', acceptor: findPresentationType('UserID'), + description: 'The user that should be allowed to provision a bot' } ]), command: async function (this: AppserviceContext, _keywords: ParsedKeywords, user: UserID): Promise> { @@ -39,6 +40,7 @@ defineInterfaceCommand({ { name: 'user', acceptor: findPresentationType('UserID'), + description: 'The user which shall not be allowed to provision bots anymore' } ]), command: async function (this: AppserviceContext, _keywords: ParsedKeywords, user: UserID): Promise> { diff --git a/src/appservice/bot/ListCommand.tsx b/src/appservice/bot/ListCommand.tsx index 10cb4191..1d6035ef 100644 --- a/src/appservice/bot/ListCommand.tsx +++ b/src/appservice/bot/ListCommand.tsx @@ -28,7 +28,7 @@ const listUnstarted = defineInterfaceCommand({ designator: ["list", "unstarted"], table: "appservice bot", parameters: parameters([]), - command: async function() { + command: async function () { return CommandResult.Ok(this.appservice.mjolnirManager.getUnstartedMjolnirs()); }, summary: "List any Mjolnir that failed to start." @@ -38,7 +38,7 @@ const listUnstarted = defineInterfaceCommand({ // and be used similar to like #=1 and #1. defineMatrixInterfaceAdaptor({ interfaceCommand: listUnstarted, - renderer: async function(this: MatrixInterfaceAdaptor, client: MatrixSendClient, commandRoomId: string, event: any, result: CommandResult) { + renderer: async function (this: MatrixInterfaceAdaptor, client: MatrixSendClient, commandRoomId: string, event: any, result: CommandResult) { tickCrossRenderer.call(this, client, commandRoomId, event, result); // don't await, it doesn't really matter. if (result.isErr()) { return; // just let the default handler deal with it. @@ -53,7 +53,7 @@ defineMatrixInterfaceAdaptor({ {mjolnir.mjolnirRecord.owner}, {mjolnir.mxid.toString()} {mjolnir.failCode}: -
+
{mjolnir.cause} })} @@ -77,9 +77,10 @@ const restart = defineInterfaceCommand({ { name: "mjolnir", acceptor: findPresentationType("UserID"), + description: 'The userid of the mjolnir to restart' } ]), - command: async(context, _keywords, mjolnirId: UserID): Promise> => { + command: async (context, _keywords, mjolnirId: UserID): Promise> => { const mjolnirManager = context.appservice.mjolnirManager; const mjolnir = mjolnirManager.findUnstartedMjolnir(mjolnirId.localpart); if (mjolnir?.mjolnirRecord === undefined) {