This commit is contained in:
root 2020-07-19 21:40:51 -04:00
commit 5678644ad7
3 changed files with 16 additions and 2 deletions

View File

@ -19,6 +19,18 @@ class Logger {
this.warn(`Shard is reconnecting.`);
});
this.client.eventHooker.hook('guildCreate', (guild) => {
this.debug(`${chalk.bold('[GUILD]')} Joined guild ${chalk.bold(guild.name)} (${guild.id}).`);
});
this.client.eventHooker.hook('guildDelete', (guild) => {
this.debug(`${chalk.bold('[GUILD]')} Left guild ${chalk.bold(guild.name)} (${guild.id}).`);
});
this.client.eventHooker.hook('commandExecute', (message) => {
this.debug(`${chalk.bold('[EXECU]')} ${message.author.tag} (${message.author.id}) executed command ${chalk.bold(message.command.moduleResolveable)}.`);
});
}
async transport(message = 'N/A', opts = {}) {

View File

@ -63,6 +63,8 @@ const Message = Structures.extend('Message', (Message) => {
return this._showUsage();
}
this.client.emit('commandExecute', this);
try {
const resolved = this.command.execute(this, {
params: this.parameters,

View File

@ -11,6 +11,6 @@ module.exports = {
Vckick: require('./Vckick.js'),
Slowmode: require('./Slowmode.js'),
Nickname: require('./Nickname.js'),
AddRole: require('./Addrole.js'),
RemoveRole: require('./Removerole.js')
AddRole: require('./AddRole.js'),
RemoveRole: require('./RemoveRole.js')
};