From faf389a66e4894cf9626255d3dc3f5a7bdbbe114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 25 Aug 2020 09:30:24 +0300 Subject: [PATCH] Added status command --- client/commands/status.js | 23 +++++++++++++++++++++++ client/messages.js | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 client/commands/status.js diff --git a/client/commands/status.js b/client/commands/status.js new file mode 100644 index 0000000..0e8e381 --- /dev/null +++ b/client/commands/status.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'status', + alias: 'none', + usage: '', + description: 'Bot Status', + permission: 'none', + category: 'info', + async execute(msg, args, client, Discord, command) { + let message = {}; + + message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username); + + const embed = new Discord.MessageEmbed() + .setTitle(message.statusTitle) + .setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, '')) + .setColor(client.config.embedColor) + .addField(client.messages.statusField1, client.ws.ping, true) + .addField(client.messages.statusField2, uptime, true) + .setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, '')); + msg.channel.send(embed); + + }, +}; \ No newline at end of file diff --git a/client/messages.js b/client/messages.js index 98b9fd6..8aee6ed 100644 --- a/client/messages.js +++ b/client/messages.js @@ -34,5 +34,8 @@ module.exports = { errorToGetPlaylist: "You can't use this bot because it has no playlist available. Check more information in our Discord support server %client.config.supportGuild% !", notAllowed: "You are not allowed to do that!", sendedMaintenanceMessage: "This bot is going to be under maintenance!", - footerText: "EximiaBots by Warén Group" + footerText: "EximiaBots by Warén Group", + statusTitle: "%client.user.username% Status", + statusField1: "Ping", + statusField2: "Uptime" }; \ No newline at end of file