mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
26 lines
663 B
JavaScript
26 lines
663 B
JavaScript
const Command = require('../../framework/Command');
|
|
const quotes = require('../../assets/json/quote');
|
|
|
|
module.exports = class QuoteCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'quote',
|
|
group: 'random-res',
|
|
description: 'Responds with a random quote.',
|
|
credit: [
|
|
{
|
|
name: 'Luke Peavey',
|
|
url: 'https://github.com/lukePeavey',
|
|
reason: 'Quotes Data',
|
|
reasonURL: 'https://github.com/lukePeavey/quotable/blob/master/data/sample/quotes.json'
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg) {
|
|
const quote = quotes[Math.floor(Math.random() * quotes.length)];
|
|
return msg.say(`${quote.content} - _${quote.author}_`);
|
|
}
|
|
};
|