Browse Source

Attempt to sort user rounds by most recent

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
636b3a0b1e
  1. 7
      bot/awesomescibo.js

7
bot/awesomescibo.js

@ -398,7 +398,7 @@ function aboutMessage(message) {
} }
async function userRounds(message) { async function userRounds(message) {
let rounds = await generatedRound.find({ requestedBy: message.author.id }); let rounds = await generatedRound.find({ requestedBy: message.author.id }).sort({ timestamp: -1 });
let finalMessage = ""; let finalMessage = "";
if (!rounds) { if (!rounds) {
message.reply("you haven't requested any rounds!"); message.reply("you haven't requested any rounds!");
@ -445,10 +445,7 @@ client.on("message", async (message) => {
sendHelpMessage(message); sendHelpMessage(message);
break; break;
case "doberoundgen": // Generate round publicly case "doberoundgen": // Generate round publicly
generateRound(message, false); generateRound(message);
break;
case "doberoundgendm": // Generate round through DM
generateRound(message, true);
break; break;
case "dobescoring": // Start scoring case "dobescoring": // Start scoring
startScoring(message); startScoring(message);

Loading…
Cancel
Save