diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-30 17:05:51 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-30 17:07:09 -0400 |
| commit | 1662608835099ee3176d07d67c6a3c69f716f938 (patch) | |
| tree | 6a891bdc439c32e0c10369d91e55c9b4e444c65f /bot/src/commands | |
| parent | 3c61c156137984cf61d3517d4d9633ca6de072f6 (diff) | |
| download | AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.tar.gz AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.tar.bz2 AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.zip | |
Fixed issues; Generate bot invite; Added database migrations
Diffstat (limited to 'bot/src/commands')
| -rw-r--r-- | bot/src/commands/about.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bot/src/commands/about.js b/bot/src/commands/about.js index 177ac47..ac78291 100644 --- a/bot/src/commands/about.js +++ b/bot/src/commands/about.js @@ -3,7 +3,9 @@ import { ButtonBuilder, EmbedBuilder, SlashCommandBuilder, - ButtonStyle + ButtonStyle, + PermissionFlagsBits, + OAuth2Scopes } from 'discord.js'; import { readFileSync } from 'node:fs'; import { abEmbedColour } from '../storage/consts.js'; @@ -15,6 +17,18 @@ export default { .setName('about') .setDescription('Information about this bot.'), async execute(interaction) { + const botInvite = interaction.client.generateInvite({ + permissions: [ + PermissionFlagsBits.EmbedLinks, + PermissionFlagsBits.SendMessages, + PermissionFlagsBits.ManageMessages, + PermissionFlagsBits.ViewAuditLog, + PermissionFlagsBits.ViewChannel, + PermissionFlagsBits.AddReactions + ], + scopes: [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands] + }); + const aboutEmbed = new EmbedBuilder() .setAuthor({ name: `AleeBot ${version}`, iconURL: interaction.client.user.avatarURL() }) .addFields( @@ -38,7 +52,7 @@ export default { new ButtonBuilder() .setStyle(ButtonStyle.Link) .setLabel('Invite AleeBot') - .setURL(`https://discord.com/oauth2/authorize?client_id=${interaction.client.user.id}`), + .setURL(botInvite), new ButtonBuilder() .setStyle(ButtonStyle.Link) .setLabel('Join Andrew Lee Projects') |
