`));
if (this.winner.connected) this.winner.popup(`You have won the giveaway. PM **${Chat.escapeHTML(this.giver.name)}** to claim your prize!`);
if (this.giver.connected) this.giver.popup(`${Chat.escapeHTML(this.winner.name)} has won your question giveaway!`);
}
@@ -316,7 +310,7 @@ class LotteryGiveaway extends Giveaway {
generateReminder(joined) {
let cmd = (joined ? 'Leave' : 'Join');
let button = ``;
- return this.generateWindow(`The lottery drawing will occur in 2 minutes, and with ${this.maxwinners} winner${checkPlural(this.maxwinners)}! ${button}
`);
+ return this.generateWindow(`The lottery drawing will occur in 2 minutes, and with ${this.maxwinners} winner${Chat.plural(this.maxwinners)}! ${button}`);
}
display() {
@@ -382,11 +376,11 @@ class LotteryGiveaway extends Giveaway {
this.changeUhtml('
The giveaway has ended! Scroll down to see the winner${checkPlural(this.winners)}.
`);
+ this.changeUhtml(`
The giveaway has ended! Scroll down to see the winner${Chat.plural(this.winners)}.
`);
this.phase = 'ended';
let winnerNames = this.winners.map(winner => winner.name).join(', ');
this.room.modlog(`${winnerNames} won ${this.giver.name}'s giveaway for "${this.prize}"`);
- this.send(this.generateWindow(`
Lottery Draw
${Object.keys(this.joined).length} users joined the giveaway. Our lucky winner${checkPlural(this.winners)}: ${Chat.escapeHTML(winnerNames)}! Congratulations!
`));
+ this.send(this.generateWindow(`
Lottery Draw
${Object.keys(this.joined).length} users joined the giveaway. Our lucky winner${Chat.plural(this.winners)}: ${Chat.escapeHTML(winnerNames)}! Congratulations!
`));
for (let i = 0; i < this.winners.length; i++) {
if (this.winners[i].connected) this.winners[i].popup(`You have won the lottery giveaway! PM **${this.giver.name}** to claim your prize!`);
}
@@ -435,7 +429,7 @@ let commands = {
if (user.userid !== giveaway.host.userid && user.userid !== giveaway.giver.userid) return;
this.sendReply(`The giveaway question is ${giveaway.question}.\n` +
- `The answer${checkPlural(giveaway.answers, 's are', ' is')} ${giveaway.answers.join(', ')}.`);
+ `The answer${Chat.plural(giveaway.answers, 's are', ' is')} ${giveaway.answers.join(', ')}.`);
},
guessanswer: 'guess',
guess: function (target, room, user) {