mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-10 19:04:42 +02:00
Credit Command
This commit is contained in:
@@ -12,7 +12,13 @@ module.exports = class ChangelogCommand extends Command {
|
||||
group: 'util',
|
||||
memberName: 'changelog',
|
||||
description: 'Responds with the bot\'s latest 10 commits.',
|
||||
guarded: true
|
||||
guarded: true,
|
||||
credit: [
|
||||
{
|
||||
name: 'GitHub API',
|
||||
url: 'https://developer.github.com/v3/'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class CreditCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'credit',
|
||||
group: 'util',
|
||||
memberName: 'credit',
|
||||
description: 'Responds with a command\'s credits list.',
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'command',
|
||||
prompt: 'Which command would you like to view the credits list of?',
|
||||
type: 'command'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { command }) {
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(command.name)
|
||||
.setColor(0x7289DA)
|
||||
.setDescription(command.credit.map(credit => `[${credit.name}](${credit.url})`).join('\n'));
|
||||
return msg.embed(embed);
|
||||
}
|
||||
};
|
||||
+11
-1
@@ -9,7 +9,17 @@ module.exports = class DonateCommand extends Command {
|
||||
group: 'util',
|
||||
memberName: 'donate',
|
||||
description: 'Responds with the bot\'s donation links.',
|
||||
guarded: true
|
||||
guarded: true,
|
||||
credit: [
|
||||
{
|
||||
name: 'Patreon',
|
||||
url: 'https://www.patreon.com/'
|
||||
},
|
||||
{
|
||||
name: 'PayPal',
|
||||
url: 'https://www.paypal.com/us/home'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user