From 1ce235be50b4ebf5c8c47017e3994f20bb67d7fb Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Thu, 28 May 2026 02:01:15 +0200 Subject: [PATCH 1/2] Add a `/randspotlight` command --- server/chat-plugins/daily-spotlight.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/server/chat-plugins/daily-spotlight.ts b/server/chat-plugins/daily-spotlight.ts index c8bb39ec37..b8c9f7ad26 100644 --- a/server/chat-plugins/daily-spotlight.ts +++ b/server/chat-plugins/daily-spotlight.ts @@ -298,6 +298,23 @@ export const commands: Chat.ChatCommands = { } room.update(); }, + randdaily: 'randspotlight', + randspotlight(target, room, user) { + room = this.requireRoom(); + if (!room.persist) throw new Chat.ErrorMessage("This command is unavailable in temporary rooms."); + if (!spotlights[room.roomid]) throw new Chat.ErrorMessage("This room has no daily spotlights."); + const keys = Object.keys(spotlights[room.roomid]); + if (!keys.length) throw new Chat.ErrorMessage("This room has no daily spotlights."); + if (!this.runBroadcast()) return; + const key = keys[Math.floor(Math.random() * keys.length)]; + const html = renderSpotlight(room.roomid, key); + this.sendReplyBox(`

Random spotlight: ${Utils.escapeHTML(key)}

${html}`); + }, + randspotlighthelp: [ + `/randspotlight - Shows a random spotlight from all rooms.`, + `/randdaily - Alias for /randspotlight.`, + `!randspotlight - Show a random spotlight to everyone. Requires: + % @ # ~`, + ], vsl: 'viewspotlights', dailies: 'viewspotlights', viewspotlights(target, room, user) { From dabbc5c5789c518b5e544797c8d62e355b906efc Mon Sep 17 00:00:00 2001 From: Sergio Garcia <47090312+singiamtel@users.noreply.github.com> Date: Thu, 28 May 2026 10:31:33 +0200 Subject: [PATCH 2/2] Update server/chat-plugins/daily-spotlight.ts Co-authored-by: iforgetwhyimhere --- server/chat-plugins/daily-spotlight.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/chat-plugins/daily-spotlight.ts b/server/chat-plugins/daily-spotlight.ts index b8c9f7ad26..26168cfdfb 100644 --- a/server/chat-plugins/daily-spotlight.ts +++ b/server/chat-plugins/daily-spotlight.ts @@ -311,9 +311,8 @@ export const commands: Chat.ChatCommands = { this.sendReplyBox(`

Random spotlight: ${Utils.escapeHTML(key)}

${html}`); }, randspotlighthelp: [ - `/randspotlight - Shows a random spotlight from all rooms.`, - `/randdaily - Alias for /randspotlight.`, - `!randspotlight - Show a random spotlight to everyone. Requires: + % @ # ~`, + `/randspotlight OR /randdaily - Shows a random spotlight from the target room.`, + `!randspotlight OR !randdaily - Show a random spotlight to everyone. Requires: + % @ # ~`, ], vsl: 'viewspotlights', dailies: 'viewspotlights',