From 2912897e32969bca081e42ca8042d22246390914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sun, 9 Sep 2018 00:22:05 +0200 Subject: [PATCH] Fixed stats --- commands/thing/stats.js | 2 +- index.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/commands/thing/stats.js b/commands/thing/stats.js index 505d97c8..bbac1220 100644 --- a/commands/thing/stats.js +++ b/commands/thing/stats.js @@ -10,6 +10,6 @@ module.exports = class MeowCommand extends Command { } run(message) { - return message.channel.send(`Servers: ${this.client.guilds.size}\nChannels: ${this.client.channels.size}\nUsers : ${this.client.users.size}`); + return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${this.client.uptime}\``); } }; \ No newline at end of file diff --git a/index.js b/index.js index 053ba0e7..d8c6daa1 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const { CommandoClient } = require('discord.js-commando'); const path = require('path'); -const { activity, token } = require('./config.json'); +const { token } = require('./config.json'); const responseObject = require("./reply.json"); const fs = require("fs"); @@ -26,11 +26,11 @@ client.registry client.on('ready', () => { console.log(`Logged in as ${client.user.tag}! (${client.user.id})`); console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`); - client.user.setActivity(activity); - const channel = client.channels.get('487766113292124160'); - channel.send(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`); +// Send stats to the "stats" channel in the support server + const channel = client.channels.get('487766113292124160'); + channel.send(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`); }); -// when bot join a guild send embeds with detail about it +// When bot join a guild send embeds with details about it. client.on("guildCreate", guild => { console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`); const channel = client.channels.get('487766113292124160'); @@ -43,7 +43,7 @@ client.registry channel.send({ embed: exampleEmbed }); }) - +// When bot get kicked from a guild send embeds with details about it. client.on("guildDelete", guild => { console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}\n***BOT KICKED***`); const channel = client.channels.get('487766113292124160');