From b39b583b4b00ddb089f4a2bb2d4e41e4d857c06e Mon Sep 17 00:00:00 2001 From: HoeenHero Date: Mon, 11 May 2020 13:35:39 -0400 Subject: [PATCH] Add support for a Video Game of the day --- server/chat-plugins/thing-of-the-day.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/chat-plugins/thing-of-the-day.ts b/server/chat-plugins/thing-of-the-day.ts index c79ed09643..fe01989a15 100644 --- a/server/chat-plugins/thing-of-the-day.ts +++ b/server/chat-plugins/thing-of-the-day.ts @@ -2,7 +2,8 @@ import {FS, FSPath} from '../../lib/fs'; const MINUTE = 60 * 1000; const PRENOM_BUMP_TIME = 2 * 60 * MINUTE; -const ROOMIDS = ['thestudio', 'jubilifetvfilms', 'youtube', 'thelibrary', 'prowrestling', 'animeandmanga', 'sports']; +const ROOMIDS = ['thestudio', 'jubilifetvfilms', 'youtube', 'thelibrary', + 'prowrestling', 'animeandmanga', 'sports', 'videogames']; const rooms: {[k: string]: ChatRoom} = {}; @@ -20,6 +21,7 @@ const BOTWS_FILE = 'config/chat-plugins/thelibrary.tsv'; const MOTWS_FILE = 'config/chat-plugins/prowrestling-matches.tsv'; const ANOTDS_FILE = 'config/chat-plugins/animeandmanga-shows.tsv'; const ATHOTDS_FILE = 'config/chat-plugins/sports-athletes.tsv'; +const VGOTDS_FILE = 'config/chat-plugins/videogames-games.tsv'; const PRENOMS_FILE = 'config/chat-plugins/otd-prenoms.json'; let prenoms: {[k: string]: [string, AnyObject][]} = {}; @@ -416,6 +418,7 @@ otds.set('botw', new OtdHandler('botw', 'Book', rooms.thelibrary, BOTWS_FILE, [' otds.set('motw', new OtdHandler('motw', 'Match', rooms.prowrestling, MOTWS_FILE, ['match', 'nominator', 'link', 'tagline', 'event', 'image', 'time'], ['Match', 'Nominator', 'Link', 'Tagline', 'Event', 'Image', 'Timestamp'], true)); otds.set('anotd', new OtdHandler('anotd', 'Animanga', rooms.animeandmanga, ANOTDS_FILE, ['show', 'nominator', 'link', 'tagline', 'image', 'time'], ['Show', 'Nominator', 'Link', 'Tagline', 'Image', 'Timestamp'])); otds.set('athotd', new OtdHandler('athotd', 'Athlete', rooms.sports, ATHOTDS_FILE, ['athlete', 'nominator', 'image', 'sport', 'team', 'country', 'age', 'quote', 'time'], ['Athlete', 'Nominator', 'Image', 'Sport', 'Team', 'Country', 'Age', 'Quote', 'Timestamp'])); +otds.set('vgotd', new OtdHandler('vgotd', 'Video Game', rooms.videogames, VGOTDS_FILE, ['game', 'nominator', 'link', 'quote', 'time'], ['Video Game', 'Nominator', 'Link', 'Quote', 'Timestamp'])); function selectHandler(message: string) { const id = toID(message.substring(1).split(' ')[0]);