mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Node 15
This commit is contained in:
@@ -23,7 +23,7 @@ module.exports = class NeverHaveIEverCommand extends Command {
|
||||
async run(msg) {
|
||||
try {
|
||||
const { text } = await request.get('http://www.neverhaveiever.org/randomtext.php');
|
||||
return msg.say(text.match(/<h1>(.+)<\/h1>/i)[1].replace(/<\/br>/g, ''));
|
||||
return msg.say(text.match(/<h1>(.+)<\/h1>/i)[1].replaceAll('</br>', ''));
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user