mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add usage and lastRun Data to slash
This commit is contained in:
@@ -160,6 +160,8 @@ module.exports = class CommandClient extends Client {
|
||||
|
||||
try {
|
||||
const result = await command.run(interaction);
|
||||
command.uses++;
|
||||
command.lastRun = new Date();
|
||||
this.emit('commandRun', command, result, interaction);
|
||||
} catch (err) {
|
||||
this.emit('commandError', interaction, err);
|
||||
|
||||
@@ -10,5 +10,7 @@ module.exports = class SlashCommand {
|
||||
url: 'https://github.com/dragonfire535',
|
||||
reason: 'Code'
|
||||
});
|
||||
this.uses = 0;
|
||||
this.lastRun = null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user