Skip to content

Commit

Permalink
Fix an issue with the top voters system
Browse files Browse the repository at this point in the history
  • Loading branch information
SunburntRock89 committed May 28, 2023
1 parent a37fc1a commit 47c094f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internals/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ scheduleJob("0 20 * * 0", async() => {
text: "You can now make any number of your choice VIP by dialing *411 and selecting VIP Options.",
});

user.send({ embeds: [winningEmbed] });
user.send({ embeds: [winningEmbed] }).catch(() => null);
}

const announcementEmbed = new EmbedBuilder()
Expand All @@ -196,7 +196,7 @@ scheduleJob("0 20 * * 0", async() => {

announcementEmbed.addFields([{
name: `Top ${givenToTop}`,
value: topVoters.map((v, i) => `${i + 1}. ${v.count} votes - <@${usernames[i]}>`).join("\n"),
value: topVoters.map((v, i) => `${i + 1}. ${v.count} vote${v.count == 1 ? "" : "s"} - ${usernames[i]}`).join("\n"),
}]);

try {
Expand Down

0 comments on commit 47c094f

Please sign in to comment.