closes #2
adds xhb alerts 15 minutes before xhb start (should ping the XHBr role but i haven't tested it so it might not work)
adds an alert when xhb starts
adds an alert 30, 10 and 2 minutes before xhb end
adds an alert when xhb ends
new module in irc_alerts.js, exposes function setXHBTimeouts which pulls battle data from the BotB API, clears all running timeouts, gets all XHBs that are not in voting phase and sets all appropriate timeouts which are calculated from period_end_seconds. it's kinda hard coded but i doubt we're going to be changing the periods when xhb alerts happen anyway so it's probably good enough.
setXHBTimeouts is called when the bot server initialises, when the bot receives a POST request to run the say command and every 5 minutes set by an interval.
closes #2 adds xhb alerts 15 minutes before xhb start (should ping the XHBr role but i haven't tested it so it might not work) adds an alert when xhb starts adds an alert 30, 10 and 2 minutes before xhb end adds an alert when xhb ends
new module in
irc_alerts.js
, exposes functionsetXHBTimeouts
which pulls battle data from the BotB API, clears all running timeouts, gets all XHBs that are not in voting phase and sets all appropriate timeouts which are calculated fromperiod_end_seconds
. it's kinda hard coded but i doubt we're going to be changing the periods when xhb alerts happen anyway so it's probably good enough.setXHBTimeouts
is called when the bot server initialises, when the bot receives a POST request to run thesay
command and every 5 minutes set by an interval.PS: i hate tabs