Browse Source

Get rid of generating message

pull/10/head
Abheek Dhawan 4 years ago
parent
commit
7db57a1191
  1. 7
      bot/awesomescibo.js

7
bot/awesomescibo.js

@ -367,7 +367,6 @@ function aboutMessage(message) {
async function rounds(action, interaction) {
if (action === "generate") {
const generatingMessage = interaction.reply("Generating...", { ephemeral: true });
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 tossup_question;
@ -405,11 +404,7 @@ async function rounds(action, interaction) {
console.log(err);
return;
}
interaction.channel.messages.fetch(generatingMessage.id)
.then(generatingMessage => {
const msg = generatingMessage.first();
msg.edit(`Here's your round: https://api.adawesome.tech/round/${round._id.toString()}`);
});
interaction.reply(`Here's your round: https://api.adawesome.tech/round/${round._id.toString()}`);
});
});
} else if (action === "list"){

Loading…
Cancel
Save