Add missing parameter descriptions

This commit is contained in:
MTRNord
2023-06-23 11:12:24 +02:00
parent 732b996c5a
commit 35115bb461
2 changed files with 7 additions and 4 deletions
+2
View File
@@ -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<CommandResult<void>> {
@@ -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<CommandResult<void>> {
+5 -4
View File
@@ -28,7 +28,7 @@ const listUnstarted = defineInterfaceCommand<AppserviceBaseExecutor>({
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<AppserviceBaseExecutor>({
// and be used similar to like #=1 and #1.
defineMatrixInterfaceAdaptor({
interfaceCommand: listUnstarted,
renderer: async function(this: MatrixInterfaceAdaptor<MatrixContext, BaseFunction>, client: MatrixSendClient, commandRoomId: string, event: any, result: CommandResult<UnstartedMjolnir[]>) {
renderer: async function (this: MatrixInterfaceAdaptor<MatrixContext, BaseFunction>, client: MatrixSendClient, commandRoomId: string, event: any, result: CommandResult<UnstartedMjolnir[]>) {
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},
<code>{mjolnir.mxid.toString()}</code>
<code>{mjolnir.failCode}</code>:
<br/>
<br />
{mjolnir.cause}
</li>
})}
@@ -77,9 +77,10 @@ const restart = defineInterfaceCommand<AppserviceBaseExecutor>({
{
name: "mjolnir",
acceptor: findPresentationType("UserID"),
description: 'The userid of the mjolnir to restart'
}
]),
command: async(context, _keywords, mjolnirId: UserID): Promise<CommandResult<true>> => {
command: async (context, _keywords, mjolnirId: UserID): Promise<CommandResult<true>> => {
const mjolnirManager = context.appservice.mjolnirManager;
const mjolnir = mjolnirManager.findUnstartedMjolnir(mjolnirId.localpart);
if (mjolnir?.mjolnirRecord === undefined) {