Update /caption mesId argument name

This commit is contained in:
Cohee 2024-09-13 20:28:19 +03:00
parent 73c14711e1
commit 084eebf610
1 changed files with 4 additions and 4 deletions

View File

@ -358,10 +358,10 @@ function onRefineModeInput() {
*/
async function captionCommandCallback(args, prompt) {
const quiet = isTrueBoolean(args?.quiet);
const id = args?.id;
const mesId = args?.mesId ?? args?.id;
if (!isNaN(Number(id))) {
const message = getContext().chat[id];
if (!isNaN(Number(mesId))) {
const message = getContext().chat[mesId];
if (message?.extra?.image) {
try {
const fetchResult = await fetch(message.extra.image);
@ -546,7 +546,7 @@ jQuery(async function () {
'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false',
),
SlashCommandNamedArgument.fromProps({
name: 'id',
name: 'mesId',
description: 'get image from a message with this ID',
typeList: [ARGUMENT_TYPE.NUMBER],
enumProvider: commonEnumProviders.messages(),