From 9cee18dcdd54fcae8939f93f34eda4cdca5ef2d7 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 16 Dec 2022 21:58:51 -0500 Subject: [PATCH] Allow reference in the singular for a 1 die roll --- commands/lottery.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/lottery.js b/commands/lottery.js index d2bbbea..c255a4b 100644 --- a/commands/lottery.js +++ b/commands/lottery.js @@ -65,6 +65,11 @@ module.exports = { lotteryNumbers.push(randomInt(1, maxRoll)); } - await interaction.reply({ content: `Your lucky numbers are...\n${lotteryNumbers.toString().split(',').join(', ')}.`, ephemeral: (isEphemeral === 'true') }); + if (rollCount === 1) { + await interaction.reply({ content: `Your lucky number is...\n${lotteryNumbers.toString().split(',').join(', ')}.`, ephemeral: (isEphemeral === 'true') }); + } + else { + await interaction.reply({ content: `Your lucky numbers are...\n${lotteryNumbers.toString().split(',').join(', ')}.`, ephemeral: (isEphemeral === 'true') }); + } }, }; \ No newline at end of file