clear onProgress before closure for no progress

0d9843cdd666021c8773da7b891875c4780d044f

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +2 -2Ignore whitespace
public/scripts/slash-commands.js+2 -2
@@ -2242,9 +2242,9 @@ async function echoCallback(args, value) {
2242 if (args.onClick) {2242 if (args.onClick) {
2243 if (args.onClick instanceof SlashCommandClosure) {2243 if (args.onClick instanceof SlashCommandClosure) {
2244 options.onclick = async () => {2244 options.onclick = async () => {
2245 // Execute the slash command directly, with its internal scope and everything. Clear progress at the end if the main script is already done.2245 // Execute the slash command directly, with its internal scope and everything. Clear progress handler so it doesn't interfere with command execution progress.
2246 args.onClick.onProgress = null;
2246 await args.onClick.execute();2247 await args.onClick.execute();
2247 await clearCommandProgress();
2248 };2248 };
2249 } else {2249 } else {
2250 toastr.warning('Invalid onClick provided for /echo command. This is not a closure');2250 toastr.warning('Invalid onClick provided for /echo command. This is not a closure');