diff --git a/commands/utility/donate.js b/commands/utility/donate.js index abc7dbb..fa369d2 100644 --- a/commands/utility/donate.js +++ b/commands/utility/donate.js @@ -1,4 +1,5 @@ const { Command } = require('discord-akairo'); +const { donations } = require('../../config.json'); class donateCommand extends Command { constructor() { @@ -15,10 +16,18 @@ class donateCommand extends Command { } async exec(message) { + 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}`; + }); + const Embed = this.client.util.embed() .setColor(message.member ? message.member.displayHexColor : 'NAVY') .setTitle('Donation link') - .setDescription('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\n[Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KEMESDXL8Q5YY&source=url)\nYou can give [BAT token](https://namejeff.xyz) on my website'); + .setDescription(desc); return message.channel.send(Embed); } diff --git a/config-exemple.jsonc b/config-exemple.jsonc index 512188f..b713dd3 100644 --- a/config-exemple.jsonc +++ b/config-exemple.jsonc @@ -18,6 +18,10 @@ "twiConsumerSecret": "Twitter consumer key secret", //optional | for the twitter command "twiToken": "Twitter token", //optional | for the twitter command "twiTokenSecret": "Twitter token secret", //optional | for the twitter command + "donations": [ //optional | Donations link to appear in the donation command, markdown can be used in here + "ETH adresse: 0x0bc758F572a7D9689e3507C1dd12451Ae4521252", + "BTC adresse: bc1q28gdt7hzlml0grmvvextpxeekz5fss7tm5lfsp" + ], "proxy": [ //Optional | Used for youtube-dl { "ip": "IP:PORT",