| 2242 | 2242 | if (args.onClick) { |
| 2243 | 2243 | if (args.onClick instanceof SlashCommandClosure) { |
| 2244 | 2244 | options.onclick = async () => { |
| 2245 | 2245 | // Execute the slash command directly, with its internal scope and everything. Clear progress at thehandler endso ifit thedoesn't maininterfere scriptwith iscommand alreadyexecution doneprogress. |
| 2246 | + args.onClick.onProgress = null; |
| 2246 | 2247 | await args.onClick.execute(); |
| 2247 | | - await clearCommandProgress(); |
| 2248 | 2248 | }; |
| 2249 | 2249 | } else { |
| 2250 | 2250 | toastr.warning('Invalid onClick provided for /echo command. This is not a closure'); |