2022-08-28 17:03:15 +02:00
|
|
|
import { SlashCommandBuilder } from 'discord.js';
|
|
|
|
import { EmbedBuilder } from 'discord.js';
|
2024-07-04 19:15:29 +02:00
|
|
|
import donations from '../../json/donations.json' with {type: 'json'};
|
2022-08-17 20:53:08 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('donate')
|
|
|
|
.setDescription('Show donation link for the bot.'),
|
2022-08-28 17:03:15 +02:00
|
|
|
category: 'utility',
|
2022-08-17 20:53:08 +02:00
|
|
|
async execute(interaction) {
|
|
|
|
let desc = 'If you decide to donate, please do /feedback to let the owner know about it so he can put you in the about and donator command.';
|
|
|
|
donations.forEach(m => {
|
|
|
|
desc += `\n${m}`;
|
|
|
|
});
|
|
|
|
|
2022-08-28 17:03:15 +02:00
|
|
|
const Embed = new EmbedBuilder()
|
2022-09-08 16:56:15 +02:00
|
|
|
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
2022-08-17 20:53:08 +02:00
|
|
|
.setTitle('Donation link')
|
|
|
|
.setDescription(desc);
|
|
|
|
|
|
|
|
return interaction.reply({ embeds: [Embed] });
|
|
|
|
},
|
|
|
|
};
|