Convert currency to Euro/USD

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.

Hey @prallo1!

Have a look there: How to convert currencies?

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://$(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$(querystring)%20eur&includepodid=Result&format=plaintext&output=json&appid=YOURAPPIDHERE)

Or this:

$(urlfetch json $(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 !

1 Like

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