Сurrency exchange team € $ £

Hello! Help, please, create a team of exchange rates! For example: !exchangerate USD or !exchangerate EUR is the value of “Value” from any of these links:

https://www.cbr-xml-daily.ru/daily_json.js
https://www.cbr-xml-daily.ru/daily.xml

I can not do it!(( Thank!

@ny_pogodi

Copy and paste this into chat:

!addcom -cd=5 !exchangerate $(eval a=JSON.parse(`$(urlfetch json https://www.cbr-xml-daily.ru/daily_json.js)`);b=decodeURIComponent(`$(querystring)`).toUpperCase();try{c=a.Valute[b].Value;`Exchange rate for `+b+`: `+c;}catch(e){`Enter a valid currency name!`;})

Usage:
!exchangerate [currency name]

Example:
!exchangerate USD

1 Like

OMG !!! Thank you very much! Works great! You are the best!

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