Status Command

This commit is contained in:
Christer Warén 2020-08-25 13:50:39 +03:00
parent cf5eee5d55
commit 86dbc506ac
3 changed files with 13 additions and 5 deletions

View File

@ -15,10 +15,13 @@ module.exports = {
.setTitle(message.statusTitle) .setTitle(message.statusTitle)
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, '')) .setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor) .setColor(client.config.embedColor)
.addField(client.messages.statusField1, client.ws.ping, true) .addField(client.messages.statusField1, Date.now() - msg.createdTimestamp + "ms", true)
.addField(client.messages.statusField2, uptime, true) .addField(client.messages.statusField2, client.ws.ping + "ms", true)
.addField(client.messages.statusField3, uptime, true)
.addField(client.messages.statusField4, client.config.version, true)
.addField(client.messages.statusField5, client.config.hostedBy, true)
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, '')); .setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
msg.channel.send(embed); msg.channel.send(embed);
}, }
}; };

View File

@ -36,6 +36,9 @@ module.exports = {
sendedMaintenanceMessage: "This bot is going to be under maintenance!", 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", statusTitle: "%client.user.username% Status",
statusField1: "Ping", statusField1: "Bot Latency",
statusField2: "Uptime" statusField2: "API Latency",
statusField3: "Uptime",
statusField4: "Version",
statusField5: "Hosted by"
}; };

View File

@ -18,8 +18,10 @@ module.exports = {
//misc //misc
embedColor: "#88aa00", embedColor: "#88aa00",
invite: "https://discordapp.com/api/oauth2/authorize?client_id=684109535312609409&permissions=3427328&scope=bot", invite: "https://discordapp.com/api/oauth2/authorize?client_id=684109535312609409&permissions=3427328&scope=bot",
hostedBy: "[Warén Group](https://waren.io)",
//Settings //Settings
prefix: process.env.RADIOX_PREFIX || "rx-", prefix: process.env.RADIOX_PREFIX || "rx-",
version: process.env.RADIOX_VERSION || process.env.npm_package_version
} }