diff options
Diffstat (limited to 'bot/src')
| -rw-r--r-- | bot/src/commands/about.js | 9 | ||||
| -rw-r--r-- | bot/src/commands/info.js | 8 | ||||
| -rw-r--r-- | bot/src/events/GuildMemberUpdate.js | 1 |
3 files changed, 14 insertions, 4 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') ); diff --git a/bot/src/commands/info.js b/bot/src/commands/info.js index 33e1665..18d01c9 100644 --- a/bot/src/commands/info.js +++ b/bot/src/commands/info.js @@ -1,5 +1,7 @@ import { SlashCommandBuilder, EmbedBuilder, version } from 'discord.js'; import { hostname, platform, release } from 'os'; +import { Sequelize } from 'sequelize'; +import { sequelize } from '../utils/sequelize.js'; import { abEmbedColour } from '../storage/consts.js'; export default { @@ -11,10 +13,12 @@ export default { .setTitle('Information on AleeBot\'s Host') .addFields( { name: 'OS Hostname: ', value: hostname(), inline: true }, + { name: 'OS Version: ', value: release(), inline: true }, + { name: 'OS Platform: ', value: platform(), inline: true }, { name: 'NodeJS Version: ', value: process.versions.node, inline: true }, { name: 'Discord.JS Version: ', value: version, inline: true }, - { name: 'OS Platform: ', value: platform(), inline: true }, - { name: 'OS Version: ', value: release(), inline: true } + { name: 'Sequelize Version: ', value: Sequelize.version, inline: true }, + { name: 'Database Type: ', value: sequelize.getDialect(), inline: true } ) .setColor(abEmbedColour); return await interaction.reply({ embeds: [hostEmbed] }); diff --git a/bot/src/events/GuildMemberUpdate.js b/bot/src/events/GuildMemberUpdate.js index 74b8034..b9185cf 100644 --- a/bot/src/events/GuildMemberUpdate.js +++ b/bot/src/events/GuildMemberUpdate.js @@ -5,6 +5,7 @@ export default { name: Events.GuildMemberUpdate, async execute(member, newMember) { try { + if (member.nickname === newMember.nickname) return; const guildSetting = await guildSettings.findOne({ where: { guildID: member.guild.id } }); if (!guildSetting || !guildSetting.logChannelID) return; |
