Files
xiao/commands/random-res/affirmation.js
T
Dragon Fire d2436c1c3c Fix
2021-04-25 10:00:09 -04:00

26 lines
688 B
JavaScript

const Command = require('../../structures/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)]);
}
};