Command Leaderboard

This commit is contained in:
Daniel Odendahl Jr
2017-09-25 11:06:44 +00:00
parent fa57a90f74
commit 5932e647b0
4 changed files with 36 additions and 1 deletions
+2
View File
@@ -67,6 +67,8 @@ client.on('warn', console.warn);
client.on('commandError', (command, err) => console.error(command.name, err));
client.on('commandRun', command => ++command.uses);
client.on('guildCreate', async () => {
const guilds = await client.shard.fetchClientValues('guilds.size');
const count = guilds.reduce((prev, val) => prev + val, 0);