From 66437490ae00798a4fe48355ff12bb45a849a613 Mon Sep 17 00:00:00 2001 From: whales Date: Sun, 28 Oct 2018 22:01:54 +1030 Subject: [PATCH] TotD: Update room after broadcasting the TotD (#4934) --- chat-plugins/thing-of-the-day.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chat-plugins/thing-of-the-day.js b/chat-plugins/thing-of-the-day.js index b5d7ce891..0342658b2 100644 --- a/chat-plugins/thing-of-the-day.js +++ b/chat-plugins/thing-of-the-day.js @@ -583,12 +583,14 @@ let commands = { if (!this.runBroadcast()) return false; const handler = selectHandler(this.message); + if (!handler.room) return this.errorReply(`The room for this -otd doesn't exist.`); if (room !== handler.room) return this.errorReply(`This command can only be used in ${handler.room.title}.`); handler.generateWinnerDisplay().then(text => { if (!text) return this.errorReply("There is no winner yet."); - return this.sendReplyBox(text); + this.sendReplyBox(text); + this.room.update(); }); }, };