Browse Source

Attempt to fix scope issue

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
26ede2a8ff
  1. 20
      bot/awesomescibo.js

20
bot/awesomescibo.js

@ -355,17 +355,19 @@ async function generateRound(message) {
bonus_answer + bonus_answer +
"<br><br>"; "<br><br>";
htmlContent = htmlContent.replace(/\n/g, "<br>"); htmlContent = htmlContent.replace(/\n/g, "<br>");
if (i === 25) {
newGeneratedRound = new generatedRound({
htmlContent: htmlContent,
requestedBy: message.author.tag,
});
newGeneratedRound.save((err) =>
err
? console.log("Error creating saving generated round content")
: console.log("Sucessfully created new entry for the generated round")
);
}
}); });
} }
newGeneratedRound = new generatedRound({
htmlContent: htmlContent,
requestedBy: message.author.tag,
});
newGeneratedRound.save((err) =>
err
? console.log("Error creating saving generated round content")
: console.log("Sucessfully created new entry for the generated round")
);
message.channel.send("Check database"); message.channel.send("Check database");
} }

Loading…
Cancel
Save