fix QR update/delete by ID

This commit is contained in:
LenAnderson 2024-07-15 19:42:36 -04:00
parent d773174bad
commit b51bf8e38e
1 changed files with 2 additions and 2 deletions

View File

@ -854,7 +854,7 @@ export class SlashCommandHandler {
try {
this.api.updateQuickReply(
args.set ?? '',
args.label ?? '',
args.id !== undefined ? Number(args.id) : (args.label ?? ''),
{
newLabel: args.newlabel,
message: (message ?? '').trim().length > 0 ? message : undefined,
@ -874,7 +874,7 @@ export class SlashCommandHandler {
}
deleteQuickReply(args, label) {
try {
this.api.deleteQuickReply(args.set, args.label ?? label);
this.api.deleteQuickReply(args.set, args.id !== undefined ? Number(args.id) : (args.label ?? label));
} catch (ex) {
toastr.error(ex.message);
}