mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
Add tons of quotes
This commit is contained in:
@@ -2,8 +2,10 @@ const Command = require('../../structures/Command');
|
||||
const { createCanvas, loadImage } = require('canvas');
|
||||
const request = require('node-superfetch');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const { list } = require('../../util/Util');
|
||||
const hats = require('../../assets/json/hat');
|
||||
const hats = fs.readdirSync(path.join(__dirname, '..', '..', 'assets', 'images', 'hat'))
|
||||
.map(hat => hat.replace('.png', ''));
|
||||
|
||||
module.exports = class HatCommand extends Command {
|
||||
constructor(client) {
|
||||
|
||||
@@ -7,12 +7,20 @@ module.exports = class QuoteCommand extends Command {
|
||||
name: 'quote',
|
||||
group: 'random-res',
|
||||
memberName: 'quote',
|
||||
description: 'Responds with a random quote.'
|
||||
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.quote} - _${quote.author}_`);
|
||||
return msg.say(`${quote.content} - _${quote.author}_`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user