Update /caption mesId argument name
| @@ -358,10 +358,10 @@ function onRefineModeInput() { | |||
| 358 | */ | 358 | */ |
| 359 | async function captionCommandCallback(args, prompt) { | 359 | async function captionCommandCallback(args, prompt) { |
| 360 | const quiet = isTrueBoolean(args?.quiet); | 360 | const quiet = isTrueBoolean(args?.quiet); |
| 361 | const id = args?.id; | 361 | const mesId = args?.mesId ?? args?.id; |
| 362 | 362 | ||
| 363 | if (!isNaN(Number(id))) { | 363 | if (!isNaN(Number(mesId))) { |
| 364 | const message = getContext().chat[id]; | 364 | const message = getContext().chat[mesId]; |
| 365 | if (message?.extra?.image) { | 365 | if (message?.extra?.image) { |
| 366 | try { | 366 | try { |
| 367 | const fetchResult = await fetch(message.extra.image); | 367 | const fetchResult = await fetch(message.extra.image); |
| @@ -546,7 +546,7 @@ jQuery(async function () { | |||
| 546 | 'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false', | 546 | 'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false', |
| 547 | ), | 547 | ), |
| 548 | SlashCommandNamedArgument.fromProps({ | 548 | SlashCommandNamedArgument.fromProps({ |
| 549 | name: 'id', | 549 | name: 'mesId', |
| 550 | description: 'get image from a message with this ID', | 550 | description: 'get image from a message with this ID', |
| 551 | typeList: [ARGUMENT_TYPE.NUMBER], | 551 | typeList: [ARGUMENT_TYPE.NUMBER], |
| 552 | enumProvider: commonEnumProviders.messages(), | 552 | enumProvider: commonEnumProviders.messages(), |