|
@ -367,7 +367,6 @@ function aboutMessage(message) { |
|
|
|
|
|
|
|
|
async function rounds(action, interaction) { |
|
|
async function rounds(action, interaction) { |
|
|
if (action === "generate") { |
|
|
if (action === "generate") { |
|
|
const generatingMessage = interaction.reply("Generating...", { ephemeral: true }); |
|
|
|
|
|
let i; |
|
|
let i; |
|
|
let finalizedHTML = '<html><head><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet"> </head><body style="width: 70%; margin-left: auto; margin-right: auto;"><h2 style="text-align: center; text-decoration: underline overline; padding: 7px;">ROUND GENERATED BY AWESOMESCIBO USING THE SCIBOWLDB API</h2>'; |
|
|
let finalizedHTML = '<html><head><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet"> </head><body style="width: 70%; margin-left: auto; margin-right: auto;"><h2 style="text-align: center; text-decoration: underline overline; padding: 7px;">ROUND GENERATED BY AWESOMESCIBO USING THE SCIBOWLDB API</h2>'; |
|
|
let tossup_question; |
|
|
let tossup_question; |
|
@ -405,11 +404,7 @@ async function rounds(action, interaction) { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
interaction.channel.messages.fetch(generatingMessage.id) |
|
|
interaction.reply(`Here's your round: https://api.adawesome.tech/round/${round._id.toString()}`); |
|
|
.then(generatingMessage => { |
|
|
|
|
|
const msg = generatingMessage.first(); |
|
|
|
|
|
msg.edit(`Here's your round: https://api.adawesome.tech/round/${round._id.toString()}`); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
} else if (action === "list"){ |
|
|
} else if (action === "list"){ |
|
|