command stat tracking (for runtime only)

This commit is contained in:
Erik 2020-08-14 22:45:32 +03:00
parent 382e6d1157
commit e1cdcc83b4

View File

@ -70,9 +70,11 @@ const Message = Structures.extend('Message', (Message) => {
params: this.parameters,
args: this.arguments
});
this.command._invokes.success++;
if(resolved instanceof Promise) await resolved;
return { error: false };
} catch(error) {
} catch (error) {
this.command._invokes.fail++;
return { error: true, message: error };
}