show number of tag per server

This commit is contained in:
Loic Bersier 2018-12-06 19:42:12 +01:00
parent 741fcd51a5
commit cb1b959e15

View file

@ -14,17 +14,20 @@ module.exports = class ServerCommand extends Command {
} }
async run(message) { async run(message) {
let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); let blacklistJson = new SelfReloadJSON('./json/blacklist.json');
if(blacklistJson[message.author.id]) if(blacklistJson[message.author.id])
return blacklist(blacklistJson[message.author.id] , message) return blacklist(blacklistJson[message.author.id] , message)
let customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`);
let count = Object.keys(customresponse).length
const addEmbed = { const addEmbed = {
color: 0x0099ff, color: 0x0099ff,
title: 'Stats of the server', title: 'Stats of the server',
thumbnail: { thumbnail: {
url: `${message.guild.iconURL}`, url: `${message.guild.iconURL}`,
}, },
description: `Member: **${message.guild.memberCount}** \nChannel number: **${message.guild.channels.size}**\nGuild created at **${message.guild.createdAt}**\nOwner: **${message.guild.owner}**`, description: `Member: **${message.guild.memberCount}** \nChannel number: **${message.guild.channels.size}**\nGuild created at **${message.guild.createdAt}**\nOwner: **${message.guild.owner}**\nTag number: **${count}**`,
}; };
message.say({ embed: addEmbed }); message.say({ embed: addEmbed });