the first commit

This commit is contained in:
adrianvic 2023-09-21 14:51:06 -03:00
commit d5920470cc
18 changed files with 1887 additions and 0 deletions

25
commands/bot/about.js Normal file
View file

@ -0,0 +1,25 @@
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const fs = require('fs');
module.exports = {
data: new SlashCommandBuilder()
.setName(`about`)
.setDescription(`About the bot`),
async execute(interaction) {
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
const botAvatarURL = interaction.client.user.displayAvatarURL();
// Create an embed with the app name, version, and codename from package.json
const responseEmbed = new EmbedBuilder()
.setTitle(`${packageJson.name} *${packageJson.codename}*\n(${packageJson.version}) `)
.setThumbnail(botAvatarURL)
.setDescription(`I'm ${packageJson.name}, click me on the command menu to see what I can do.`)
.setFooter({ text: 'Originally made by 天くま (tenkuma) - Thanks for keeping the credits ;)' });
// interaction.reply() to reply with a ephemeral message
await interaction.reply({ embeds: [responseEmbed], ephemeral: true });
},
};

12
commands/bot/ping.js Normal file
View file

@ -0,0 +1,12 @@
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
const member = interaction.guild.members.cache.get(interaction.user.id);
const nickname = member.nickname;
await interaction.reply(`Pong, ${nickname}!`);
},
};