mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Add tons of quotes
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
[
|
|
||||||
"anon",
|
|
||||||
"ash",
|
|
||||||
"becel",
|
|
||||||
"birthday",
|
|
||||||
"christmas",
|
|
||||||
"devil",
|
|
||||||
"disguise",
|
|
||||||
"dunce",
|
|
||||||
"leprechaun",
|
|
||||||
"mask",
|
|
||||||
"megumin",
|
|
||||||
"pilgrim",
|
|
||||||
"pirate",
|
|
||||||
"soviet",
|
|
||||||
"tophat",
|
|
||||||
"witch"
|
|
||||||
]
|
|
||||||
+1978
-378
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,10 @@ const Command = require('../../structures/Command');
|
|||||||
const { createCanvas, loadImage } = require('canvas');
|
const { createCanvas, loadImage } = require('canvas');
|
||||||
const request = require('node-superfetch');
|
const request = require('node-superfetch');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const fs = require('fs');
|
||||||
const { list } = require('../../util/Util');
|
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 {
|
module.exports = class HatCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
|||||||
@@ -7,12 +7,20 @@ module.exports = class QuoteCommand extends Command {
|
|||||||
name: 'quote',
|
name: 'quote',
|
||||||
group: 'random-res',
|
group: 'random-res',
|
||||||
memberName: 'quote',
|
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) {
|
run(msg) {
|
||||||
const quote = quotes[Math.floor(Math.random() * quotes.length)];
|
const quote = quotes[Math.floor(Math.random() * quotes.length)];
|
||||||
return msg.say(`${quote.quote} - _${quote.author}_`);
|
return msg.say(`${quote.content} - _${quote.author}_`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "137.0.1",
|
"version": "137.0.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user