Haha-Yes/commands/utility/donate.js
supositware dfd25c8bf2 Bunch of update
mostly replacing message.channel.send with message.reply
( i hope it work this time... )
2021-07-23 04:19:47 +02:00

36 lines
No EOL
1,023 B
JavaScript

const { Command } = require('discord-akairo');
const { donations } = require('../../config.json');
class donateCommand extends Command {
constructor() {
super('donate', {
aliases: ['donate', 'donation', 'giveallmymoney', 'givemoney'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: {
content: 'Send donate link for the bot and support server',
usage: '',
examples: ['']
}
});
}
async exec(message) {
if (donations === undefined) return message.reply('No donations has been setup on that bot.');
let desc = 'If you decide to donate, please use the feedback command to let the owner know about it so he can put you in the about and donator command.';
donations.forEach(m => {
desc += `\n${m}`;
});
const Embed = this.client.util.embed()
.setColor(message.member ? message.member.displayHexColor : 'NAVY')
.setTitle('Donation link')
.setDescription(desc);
return message.reply(Embed);
}
}
module.exports = donateCommand;