mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 15:57:43 +02:00
Fix
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = class FmlCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const { text } = await request.get('http://www.fmylife.com/random');
|
const { text } = await request.get('http://www.fmylife.com/random');
|
||||||
const $ = cheerio.load(text, { normalizeWhitespace: true });
|
const $ = cheerio.load(text, { normalizeWhitespace: true });
|
||||||
const fml = $('a.block text-blue-500').first().text().trim();
|
const fml = $('a.block').first().text().trim();
|
||||||
return msg.say(fml);
|
return msg.say(fml);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
|||||||
Reference in New Issue
Block a user