fix bools in /qr-update
This commit is contained in:
parent
acaae1b973
commit
9f4ae351db
|
@ -1,4 +1,5 @@
|
||||||
import { registerSlashCommand } from '../../../slash-commands.js';
|
import { registerSlashCommand } from '../../../slash-commands.js';
|
||||||
|
import { isTrueBoolean } from '../../../utils.js';
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
import { QuickReplyApi } from '../api/QuickReplyApi.js';
|
import { QuickReplyApi } from '../api/QuickReplyApi.js';
|
||||||
|
|
||||||
|
@ -162,11 +163,11 @@ export class SlashCommandHandler {
|
||||||
newLabel: args.newlabel,
|
newLabel: args.newlabel,
|
||||||
message: (message ?? '').trim().length > 0 ? message : undefined,
|
message: (message ?? '').trim().length > 0 ? message : undefined,
|
||||||
title: args.title,
|
title: args.title,
|
||||||
isHidden: args.hidden,
|
isHidden: args.hidden === undefined ? undefined : isTrueBoolean(args.hidden),
|
||||||
executeOnStartup: args.startup,
|
executeOnStartup: args.startup === undefined ? undefined : isTrueBoolean(args.startup),
|
||||||
executeOnUser: args.user,
|
executeOnUser: args.user === undefined ? undefined : isTrueBoolean(args.user),
|
||||||
executeOnAi: args.bot,
|
executeOnAi: args.bot === undefined ? undefined : isTrueBoolean(args.bot),
|
||||||
executeOnChatChange: args.load,
|
executeOnChatChange: args.load === undefined ? undefined : isTrueBoolean(args.load),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
|
Loading…
Reference in New Issue