diff options
Diffstat (limited to 'bot/src/commands')
| -rw-r--r-- | bot/src/commands/about.js | 45 | ||||
| -rw-r--r-- | bot/src/commands/ping.js | 9 |
2 files changed, 54 insertions, 0 deletions
diff --git a/bot/src/commands/about.js b/bot/src/commands/about.js new file mode 100644 index 0000000..9983857 --- /dev/null +++ b/bot/src/commands/about.js @@ -0,0 +1,45 @@ +import { + ActionRowBuilder, + ButtonBuilder, + EmbedBuilder, + SlashCommandBuilder, + ButtonStyle +} from 'discord.js'; +import { readFileSync } from "node:fs"; + +const { version } = JSON.parse(readFileSync('./package.json', 'utf-8')); + +export default { + data: new SlashCommandBuilder() + .setName('about') + .setDescription('Information about this bot'), + async execute(interaction) { + 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: 'License', value: 'GNU General Public License v3.0' } + //{ name: 'Contributors', value: '' } + ) + .setFooter({ text: '© Copyright 2017-2025 Andrew Lee Projects' }) + .setColor('#1fd619'); + + let Buttons = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setStyle(ButtonStyle.Link) + .setLabel('Source Code') + .setURL('https://github.com/alee14-projects/AleeBot'), + new ButtonBuilder() + .setStyle(ButtonStyle.Link) + .setLabel('Invite AleeBot') + .setURL('https://discord.com/oauth2/authorize?client_id=282547024547545109&permissions=68185158&scope=bot'), + new ButtonBuilder() + .setStyle(ButtonStyle.Link) + .setLabel('Join Andrew Lee Projects') + .setURL('https://discord.gg/EFhRDqG') + ); + + return await interaction.reply({embeds: [aboutEmbed], components: [Buttons]}); + } +}; diff --git a/bot/src/commands/ping.js b/bot/src/commands/ping.js new file mode 100644 index 0000000..996c705 --- /dev/null +++ b/bot/src/commands/ping.js @@ -0,0 +1,9 @@ +import { SlashCommandBuilder } from 'discord.js'; +export default { + data: new SlashCommandBuilder() + .setName('ping') + .setDescription('Pong!'), + async execute(interaction) { + return await interaction.reply(`**PONG!** :ping_pong: ${Math.round(interaction.client.ws.ping)} ms`); + } +}; |
