From 6da1d4c52619026ec3f73a2e5a5e0b0b26a4f095 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 16 May 2021 09:38:18 -0500 Subject: [PATCH] Add about bot command --- bot/awesomescibo.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 66c9697..bdf59c8 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -69,7 +69,7 @@ client.once("ready", () => { { "type": 1, "name": "contributors", - "description": "List contributors to the AwesomeSciBo bot", + "description": "Lists contributors to the AwesomeSciBo bot", "options": [] }, { @@ -77,6 +77,12 @@ client.once("ready", () => { "name": "changelog", "description": "Lists the 5 most recent changes in a \"git log\" type format", "options": [] + }, + { + "type": 1, + "name": "bot", + "description": "Lists information about AwesomeSciBo", + "options": [] } ], "description": "Commands regarding the creation/development of the bot" @@ -384,7 +390,7 @@ function showLeaderboard(interaction) { }); } -function about(action, interaction) { +async function about(action, interaction) { if (action === "contributors") { interaction.reply( new Discord.MessageEmbed().setTitle("Contributors: ").setDescription(` @@ -413,6 +419,13 @@ function about(action, interaction) { }); interaction.reply(changelogEmbed); + } else if (action === "bot") { + const aboutBotEmbed = new Discord.MessageEmbed() + .setAuthor(interaction.user.tag, interaction.user.displayAvatarURL()) + .setTitle("About AwesomeSciBo") + .addField("Servers", client.guilds.cache.size, true) + .addField("Training Users", await userScore.countDocuments({})) + .setTimestamp(); } }