mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 19:07:40 +01:00
clear onProgress before closure for no progress
This commit is contained in:
parent
ad04d0c9a2
commit
0d9843cdd6
@ -2242,9 +2242,9 @@ async function echoCallback(args, value) {
|
|||||||
if (args.onClick) {
|
if (args.onClick) {
|
||||||
if (args.onClick instanceof SlashCommandClosure) {
|
if (args.onClick instanceof SlashCommandClosure) {
|
||||||
options.onclick = async () => {
|
options.onclick = async () => {
|
||||||
// Execute the slash command directly, with its internal scope and everything. Clear progress at the end if the main script is already done.
|
// Execute the slash command directly, with its internal scope and everything. Clear progress handler so it doesn't interfere with command execution progress.
|
||||||
|
args.onClick.onProgress = null;
|
||||||
await args.onClick.execute();
|
await args.onClick.execute();
|
||||||
await clearCommandProgress();
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
toastr.warning('Invalid onClick provided for /echo command. This is not a closure');
|
toastr.warning('Invalid onClick provided for /echo command. This is not a closure');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user