mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
26 lines
687 B
JavaScript
26 lines
687 B
JavaScript
const Command = require('../../framework/Command');
|
|
const affirmations = require('../../assets/json/affirmation');
|
|
|
|
module.exports = class AffirmationCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'affirmation',
|
|
group: 'random-res',
|
|
memberName: 'affirmation',
|
|
description: 'Responds with a random affirmation.',
|
|
credit: [
|
|
{
|
|
name: 'Tilde Ann Thurium',
|
|
url: 'https://github.com/annthurium',
|
|
reason: 'Affirmations Data',
|
|
reasonURL: 'https://github.com/annthurium/affirmations/blob/master/affirmations.js'
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg) {
|
|
return msg.say(affirmations[Math.floor(Math.random() * affirmations.length)]);
|
|
}
|
|
};
|