so the wikipedia urlfetch example from the docs (https://docs.nightbot.tv/commands/variables/urlfetch) gives me a "Wikipedia Article: Unexpected token '{'" error. Why, and how do i resolve?
UrlFetch example
4 replies
The problem isn't SSL, it's the missing template string quotes from the documentation code:
!commands add !wiki Wikipedia Article: $(eval const api = $(urlfetch json https://en.wikipedia.org/w/api.php?format=json&action=opensearch&search=$(querystring)); api.error || !api[1][0] ? 'Please add a query to the search' : ${api[1][0]} - ${api[3][0]} )
vs
!commands add !wiki Wikipedia Article: $(eval const api = $(urlfetch json https://en.wikipedia.org/w/api.php?format=json&action=opensearch&search=$(querystring)); api.error || !api[1][0] ? 'Please add a query to the search' : *${api[1][0]} - ${api[3][0]}* )
where * should be `
They're not missing per se, but they're not visible on the docs because it looks like they are used for formatting on said docs.