mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Update /caption mesId argument name
This commit is contained in:
parent
73c14711e1
commit
084eebf610
@ -358,10 +358,10 @@ function onRefineModeInput() {
|
|||||||
*/
|
*/
|
||||||
async function captionCommandCallback(args, prompt) {
|
async function captionCommandCallback(args, prompt) {
|
||||||
const quiet = isTrueBoolean(args?.quiet);
|
const quiet = isTrueBoolean(args?.quiet);
|
||||||
const id = args?.id;
|
const mesId = args?.mesId ?? args?.id;
|
||||||
|
|
||||||
if (!isNaN(Number(id))) {
|
if (!isNaN(Number(mesId))) {
|
||||||
const message = getContext().chat[id];
|
const message = getContext().chat[mesId];
|
||||||
if (message?.extra?.image) {
|
if (message?.extra?.image) {
|
||||||
try {
|
try {
|
||||||
const fetchResult = await fetch(message.extra.image);
|
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',
|
'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false',
|
||||||
),
|
),
|
||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'id',
|
name: 'mesId',
|
||||||
description: 'get image from a message with this ID',
|
description: 'get image from a message with this ID',
|
||||||
typeList: [ARGUMENT_TYPE.NUMBER],
|
typeList: [ARGUMENT_TYPE.NUMBER],
|
||||||
enumProvider: commonEnumProviders.messages(),
|
enumProvider: commonEnumProviders.messages(),
|
||||||
|
Loading…
Reference in New Issue
Block a user