From cb1b959e158b806735a73a3ee0afb4e6e332d686 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Thu, 6 Dec 2018 19:42:12 +0100 Subject: [PATCH] show number of tag per server --- commands/utility/server.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/utility/server.js b/commands/utility/server.js index d0db229..538eb23 100644 --- a/commands/utility/server.js +++ b/commands/utility/server.js @@ -14,9 +14,12 @@ module.exports = class ServerCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) + + let customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`); + let count = Object.keys(customresponse).length const addEmbed = { color: 0x0099ff, @@ -24,7 +27,7 @@ module.exports = class ServerCommand extends Command { thumbnail: { 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 });