aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/about.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-31 01:53:47 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-31 01:53:47 -0400
commitab72ce14c8ee1c331b1c525c42cff0bba36939a1 (patch)
tree1d37e181705f7c99fde393c76f5920ce34863acf /bot/src/commands/about.js
parent49cc420662e2873516ede1fff0e9fc7d84680d31 (diff)
downloadAleeBot-ab72ce14c8ee1c331b1c525c42cff0bba36939a1.tar.gz
AleeBot-ab72ce14c8ee1c331b1c525c42cff0bba36939a1.tar.bz2
AleeBot-ab72ce14c8ee1c331b1c525c42cff0bba36939a1.zip
Fixed issue with nick changes; More info on git commit & db version
Diffstat (limited to 'bot/src/commands/about.js')
-rw-r--r--bot/src/commands/about.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/src/commands/about.js b/bot/src/commands/about.js
index ac78291..64dc5a4 100644
--- a/bot/src/commands/about.js
+++ b/bot/src/commands/about.js
@@ -29,11 +29,14 @@ export default {
scopes: [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands]
});
+ const gitCommits = await fetch('https://api.github.com/repos/Alee14/AleeBot/commits');
+ const commitData = await gitCommits.json();
+
const aboutEmbed = new EmbedBuilder()
.setAuthor({ name: `AleeBot ${version}`, iconURL: interaction.client.user.avatarURL() })
.addFields(
{ name: 'About AleeBot', value: 'AleeBot is an all-in-one bot that\'s made from the Discord.JS API!' },
- { name: 'Servers', value: `${interaction.client.guilds.cache.size}` },
+ { name: 'Servers', value: interaction.client.guilds.cache.size.toString() },
{ name: 'License', value: 'GNU General Public License v3.0' },
{ name: 'Contributors', value:
'- <@297201585090723841> (Uptime command from 2.x)\n' +
@@ -43,6 +46,8 @@ export default {
.setFooter({ text: '© Copyright 2017-2025 Andrew Lee & contributors' })
.setColor(abEmbedColour);
+ if (gitCommits.ok) aboutEmbed.spliceFields(2, 0, { name: 'Latest Commit', value: `**Hash**: ${commitData[0].sha}\n**Author:** ${commitData[0].commit.author.name}\n**Message**: ${commitData[0].commit.message}` });
+
let aboutButtons = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
@@ -55,7 +60,7 @@ export default {
.setURL(botInvite),
new ButtonBuilder()
.setStyle(ButtonStyle.Link)
- .setLabel('Join Andrew Lee Projects')
+ .setLabel('Join Andrew Lee')
.setURL('https://discord.gg/EFhRDqG')
);