Bug Report: Incorrect link in error message

When using an incorrect timezone with command variables like $(time), $(countdown), $(countup) - they (or at least $(countup) does) still link to the old timezone list at https://docs.nightbot.tv/commands/variables/time#timezones instead of the current https://docs.nightbot.tv/variables/time#timezones page.

1 Like

@samthecodingman Hmm, I am using $(time), $(countup), and $(countdown) for a long time, and still didn’t observe this glitch. I think we should make a custom output for this case.

!addcom -cd=5 !time $(eval time = `$(time $(query) "MMMM Do YYYY, h:mm:ss a z [GMT]Z")`; if ( time === `Invalid timezone specified. For a list of timezones, check https://docs.nightbot.tv/commands/variables/time#timezones` ) { `Invalid timezone specified. For a list of timezones, check https://docs.nightbot.tv/variables/time#timezones` } else { time })

It’s a band-aid fix, but does work for now. I’d also argue that your command is too verbose, and can be shortened significantly using just the following:

!addcom -cd=5 !time $(eval time = $(time $(query) “MMMM Do YYYY, h:mm:ss a z [GMT]Z”); time.replace('commands/variables', 'variables'))

1 Like

LOL, yeah. That’s a better way. I agree

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.