2019-10-27 00:26:37 +02:00
|
|
|
const { Command } = require('discord-akairo');
|
2019-10-27 00:55:13 +02:00
|
|
|
const donator = require('../../models').donator;
|
2019-10-27 00:26:37 +02:00
|
|
|
|
|
|
|
class donatorCommand extends Command {
|
|
|
|
constructor() {
|
|
|
|
super('donator', {
|
|
|
|
aliases: ['donator'],
|
|
|
|
category: 'utility',
|
|
|
|
description: {
|
|
|
|
content: 'All the people who donated for this bot <3',
|
|
|
|
usage: '',
|
|
|
|
examples: ['']
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async exec(message) {
|
2019-10-27 00:55:13 +02:00
|
|
|
const Donator = await donator.findAll({order: ['id']});
|
|
|
|
|
|
|
|
let donatorMessage = 'Thanks to:\n';
|
|
|
|
|
2019-10-27 13:15:31 +01:00
|
|
|
if (Donator[0]) {
|
|
|
|
for (let i = 0; i < Donator.length; i++) {
|
2019-11-04 14:10:02 +01:00
|
|
|
donatorMessage += `**${this.client.users.get(Donator[i].get('userID')).username}#${this.client.users.get(Donator[i].get('userID')).discriminator} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
2019-10-27 13:15:31 +01:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
donatorMessage += 'No one :(';
|
2019-10-27 00:55:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return message.channel.send(donatorMessage);
|
2019-10-27 00:26:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = donatorCommand;
|