made it show "no one :(" when there is no entry in the donator table
This commit is contained in:
parent
8c585951aa
commit
0402052870
1 changed files with 6 additions and 2 deletions
|
@ -19,8 +19,12 @@ class donatorCommand extends Command {
|
||||||
|
|
||||||
let donatorMessage = 'Thanks to:\n';
|
let donatorMessage = 'Thanks to:\n';
|
||||||
|
|
||||||
|
if (Donator[0]) {
|
||||||
for (let i = 0; i < Donator.length; i++) {
|
for (let i = 0; i < Donator.length; i++) {
|
||||||
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`;
|
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`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
donatorMessage += 'No one :(';
|
||||||
}
|
}
|
||||||
|
|
||||||
return message.channel.send(donatorMessage);
|
return message.channel.send(donatorMessage);
|
||||||
|
|
Loading…
Reference in a new issue