Browse Source

Fix user rounds command

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
52cb9e1bf9
  1. 12
      bot/awesomescibo.js

12
bot/awesomescibo.js

@ -484,10 +484,15 @@ async function userRounds(message) {
} }
rounds.forEach(async (item, index) => { rounds.forEach(async (item, index) => {
finalMessage += `[${index}. ${item.split("T")[0]}](https://api.adawesome.tech/round/${item._id.toString()})\n`; finalMessage += `${index + 1}. [${item.timestamp.split("T")[0]}](https://api.adawesome.tech/round/${item._id.toString()})\n`;
}); });
message.channel.send(finalMessage); const roundsEmbed = new Discord.MessageEmbed()
.setTitle(`Rounds requested by ${message.author.tag}`)
.setDescription(finalMessage)
.setTimestamp();
message.channel.send(roundsEmbed);
} }
client.on("message", async (message) => { client.on("message", async (message) => {
@ -527,7 +532,8 @@ client.on("message", async (message) => {
aboutMessage(message); aboutMessage(message);
break; break;
case "dobemyrounds": case "dobemyrounds":
usersRounds(message); userRounds(message);
break;
default: default:
// Do be training // Do be training
otherCommands(message); otherCommands(message);

Loading…
Cancel
Save