How to make a nightbot command that convert a given number of Thai baht to Euro
Like !baht 25000 and then the nightbot shows that in Euro.
How to make a nightbot command that convert a given number of Thai baht to Euro
Like !baht 25000 and then the nightbot shows that in Euro.
Ok, got it !
But I dont want to type in everytime like !convert thb 25000 eur !
I want to make it like this: !baht 25000 ; and then it should show me the amount in Euro
How to do that ?
You could rename !convert
with !baht
and replace $(querystring)
in the first command with thb%20$(querystring)%20eur
or thb $(querystring) eur
.
$(urlfetch json h t t p s://api.wolframalpha.com/v2/query?input=$(querystring)&includepodid=Result&format=plaintext&output=json&appid=xxxxxx-xxxxxxxxxx)
That is how it looks like now.
What it should look like ?
I have no clue, sorry I am new to this !
Edit: OK, I tried that and when I type in !baht 25000 into the chat nothing happens
Try this:
$(urlfetch json https://api.wolframalpha.com/v2/query?input=thb%20$(querystring)%20eur&includepodid=Result&format=plaintext&output=json&appid=YOURAPPIDHERE)
Or this:
$(urlfetch json https://api.wolframalpha.com/v2/query?input=thb $(querystring) eur&includepodid=Result&format=plaintext&output=json&appid=YOURAPPIDHERE)
And make sure you set up the alias properly.
Thank you very much !!!
That worked !
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.