added /vote and /botinfo commands

This commit is contained in:
Lukian LEIZOUR 2024-03-18 22:40:36 +01:00
parent 1d7bfa1407
commit 2abd90c671
7 changed files with 52 additions and 10 deletions

View file

@ -0,0 +1,22 @@
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "discord.js";
export default {
data: new SlashCommandBuilder()
.setName("botinfo")
.setDescription("Get the infos about the bot")
.setDMPermission(true),
async execute(interaction: CommandInteraction) {
const embed = new EmbedBuilder()
.setTitle("Bot infos")
.setDescription(
`
- Servers : ${interaction.client.guilds.cache.size}
- Users : ${interaction.client.users.cache.size}
`
)
.setFooter({ text: "Bot by @ninja_jambon.", iconURL: interaction.client.user.displayAvatarURL()})
.setColor("#000000");
interaction.reply({ embeds: [ embed ] });
},
};

View file

@ -6,6 +6,6 @@ export default {
.setName("help")
.setDescription("Send the help message"),
async execute(interaction: CommandInteraction) {
await interaction.reply({ embeds: [ helpEmbed() ] });
await interaction.reply({ embeds: [ helpEmbed(interaction.client.user.displayAvatarURL()) ] });
},
};

View file

@ -17,9 +17,9 @@ export default {
connection.end();
if (!user[0]) {
return interaction.editReply({ embeds: [ errorEmbed("Try asking something to the bot before requesting your quota.") ] });
return interaction.editReply({ embeds: [ errorEmbed("Try asking something to the bot before requesting your quota.", interaction.client.user.displayAvatarURL()) ] });
}
interaction.editReply({ embeds: [ quotaEmbed(user[0].quota) ] });
interaction.editReply({ embeds: [ quotaEmbed(user[0].quota, interaction.client.user.displayAvatarURL()) ] });
},
};

View file

@ -0,0 +1,18 @@
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "discord.js";
export default {
data: new SlashCommandBuilder()
.setName("vote")
.setDescription("Send the top.gg voting link")
.setDMPermission(true),
async execute(interaction: CommandInteraction) {
const embed = new EmbedBuilder()
.setTitle("Voting link")
.setURL("https://top.gg/bot/1059559067846189067/vote")
.setDescription("You can vote for Odin using this [link](https://top.gg/bot/1059559067846189067/vote).\nThank you !")
.setFooter({ text: "Bot by @ninja_jambon.", iconURL: interaction.client.user.displayAvatarURL()})
.setColor("#000000");
interaction.reply({ embeds: [ embed ] });
},
};