|
@ -321,6 +321,7 @@ async function generateRound(message) { |
|
|
let bonus_question; |
|
|
let bonus_question; |
|
|
let bonus_format; |
|
|
let bonus_format; |
|
|
let bonus_answer; |
|
|
let bonus_answer; |
|
|
|
|
|
let finalizedHTML = ""; |
|
|
let htmlContent = ""; |
|
|
let htmlContent = ""; |
|
|
await fetch("https://scibowldb.com/api/questions/random") |
|
|
await fetch("https://scibowldb.com/api/questions/random") |
|
|
.then((response) => response.json()) |
|
|
.then((response) => response.json()) |
|
@ -355,10 +356,11 @@ async function generateRound(message) { |
|
|
bonus_answer + |
|
|
bonus_answer + |
|
|
"<br><br>"; |
|
|
"<br><br>"; |
|
|
htmlContent = htmlContent.replace(/\n/g, "<br>"); |
|
|
htmlContent = htmlContent.replace(/\n/g, "<br>"); |
|
|
|
|
|
finalizedHTML += htmlContent; |
|
|
if (i === 25) { |
|
|
if (i === 25) { |
|
|
newGeneratedRound = new generatedRound({ |
|
|
newGeneratedRound = new generatedRound({ |
|
|
htmlContent: htmlContent, |
|
|
htmlContent: finalizedHTML, |
|
|
requestedBy: message.author.tag, |
|
|
requestedBy: message.author.id, |
|
|
}); |
|
|
}); |
|
|
newGeneratedRound.save((err) => |
|
|
newGeneratedRound.save((err) => |
|
|
err |
|
|
err |
|
|