This commit is contained in:
Dragon Fire
2020-10-24 14:25:32 -04:00
parent 40080cadef
commit ebd26a7b0e
25 changed files with 42 additions and 44 deletions
+1 -1
View File
@@ -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!`);
}