2019-01-19 22:34:00 +01:00
|
|
|
const { Command } = require('discord-akairo');
|
2021-01-26 21:39:21 +01:00
|
|
|
const { donations } = require('../../config.json');
|
2019-01-19 22:34:00 +01:00
|
|
|
|
|
|
|
class donateCommand extends Command {
|
|
|
|
constructor() {
|
|
|
|
super('donate', {
|
2019-10-27 00:26:28 +02:00
|
|
|
aliases: ['donate', 'donation', 'giveallmymoney', 'givemoney'],
|
2019-01-19 22:34:00 +01:00
|
|
|
category: 'utility',
|
2019-11-09 12:04:01 +01:00
|
|
|
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
|
2019-01-19 22:34:00 +01:00
|
|
|
description: {
|
|
|
|
content: 'Send donate link for the bot and support server',
|
|
|
|
usage: '',
|
|
|
|
examples: ['']
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async exec(message) {
|
2021-01-26 21:39:21 +01:00
|
|
|
if (donations === undefined) return message.channel.send('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}`;
|
|
|
|
});
|
|
|
|
|
2019-11-22 12:30:20 +01:00
|
|
|
const Embed = this.client.util.embed()
|
2020-03-22 21:54:19 +01:00
|
|
|
.setColor(message.member ? message.member.displayHexColor : 'NAVY')
|
2019-10-27 00:26:28 +02:00
|
|
|
.setTitle('Donation link')
|
2021-01-26 21:39:21 +01:00
|
|
|
.setDescription(desc);
|
2019-10-27 00:26:28 +02:00
|
|
|
|
2019-10-27 17:26:05 +01:00
|
|
|
return message.channel.send(Embed);
|
2019-01-19 22:34:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = donateCommand;
|