Fix async closure call not clearing progress

ad04d0c9a29039e89077de4e0945094fb7354fc3

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +5 -1Showing whitespace changes
public/scripts/slash-commands.js+5 -1
@@ -2241,7 +2241,11 @@ async function echoCallback(args, value) {
22412241 }
22422242 if (args.onClick) {
22432243 if (args.onClick instanceof SlashCommandClosure) {
22442244 options.onclick = async () => args.onClick.execute();{
2245+ // Execute the slash command directly, with its internal scope and everything. Clear progress at the end if the main script is already done.
2246+ await args.onClick.execute();
2247+ await clearCommandProgress();
2248+ };
22452249 } else {
22462250 toastr.warning('Invalid onClick provided for /echo command. This is not a closure');
22472251 }