Yeah no spaces. Exact string that we had before entered into the timer.
What did the query look like?
Yeah, you canāt use variables in timers. Here, $(querystring)
getās replaced what what the person puts after the command in chat. But in timers thereās nothing. So basically just remove that.
$(urlfetch http://twitch.center/customapi/quote?token=8df3f178&data=&no_id=1)
Interesting. I removed that before and still got the same thing. But Iām trying it again
Yeah it worked. Damn. I totally tried taking that out and it didnāt seem to work. Thanks again Ehsankia!
Itās working great for me, Iāve added it to 2 of the Channels Iām a Nightbot Editor for, Iām Just wondering if thereās a way to just have month/year without a Day for the time stamps? I donāt see it in the list of common variables
Edit: I Just realised itās a normal Nightbot $(time) command, DOY. I found itā¦ Still This is a great API, Keep Up the good work
Hereās Yep you can put any valid time format string. More examples here:
http://momentjs.com/docs/#/displaying/
Getting āno matching quote foundā again.
This time it is on my other list: http://twitch.center/customapi/quote/list?token=d49fff23
Timer Query: $(urlfetch http://twitch.center/customapi/quote?token=d49fff23&data=&no_id=1)
This seems to be working fine with the Timer Query you posted.
Figured this out. I had an alias defined in the configuration of the timer. Case solved.
When adding a quote to the bot today, Iām getting āRemote Server Returned Code 500ā. But I can retrieve and delete quotes, just not add this one for some reason. !addquote Either that, or Duncy hasnāt had a chance to harden for a very very long time.
Any idea what might be causing this? Otherwise Iām really happy with this API! Thank you for developing it
Interesting, it has to do with the game youāre playing (Pokemon) and the fact that your quote automatically includes the game name. More specific, itās the āĆ©ā in the name. But the bug isnāt with you, it seems like nightbot $(game) is sending the game name with the wrong encoding. It seems to be latin-1 instead of utf-8?
@night can you look into that?
Aha! That makes sense for sure. Thanks for looking into it Is there a way I can add it manually? I like having the game and time added to the quotes so that we have a referencepoint.
The way I have it is:
$(urlfetch http://example.com/?data=$(twitch $(channel) "{{game}}"))
And my channel game is set to any Pokemon game with Ć© in it.
And my server is receiving data=Pok%E9mon
\xe9 is a valid latin-1 character, not utf-8
Should I be wrapping the $(twitch) variable in some query variable?
Yes, you should be wrapping it in $(querystring)
ā¦ so $(urlfetch http://example.com/?data=$(querystring $(twitch $(channel) "{{game}}")))
should work I think
Works, though using $(channel) was giving me āunknown twitch channelā. Is there a nest limit for variable? Because this is 3 layers deep (twitch
inside querystring
inside fetchurl
).
I hardcoded my channel name though and can confirm the unicode bug goes away.
so try that @hopsqueak, surround the $(twitch) variable with $(querystring) and you may need to replace $(channel) with your real channel name.
Iām somewhat lost at this whole thing, so could you help me modify the command Iāve got so that I can adjust it to the two version of nightbot I maintain?
This is my !addquote command:
$(urlfetch http://twitch.center/customapi/addquote?token=redacted&data=$(querystring) [$(time Australia/Lindeman āLā)] [$(twitch $(channel) ā{{game}}ā)])
$(urlfetch http://twitch.center/customapi/addquote?token=redacted&data=$(querystring) [$(time Australia/Lindeman "L")] [$(querystring $(twitch $(channel) "{{game}}"))])
if that fails replace $(channel)
with your actual username.