Csgo inventory value nightbot command

Asked May 21, 2023·3 replies·Last activity 3 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

So i try do the first time inventory value after what i did research i found out this api (http://) (csgobackpack.net/api/GetInventoryValue/) other things i can't find, and this api shows the inventory value of the username on steam, and updates every 5 minutes i know a little of Javascript im still in stage of learning it and maybe by using urlfetch i can figure out something if you want to help me feel free to write down in the comments. Thanks to all - Virtual

3 replies

Hey @Earnest Mammoth!

It looks like the API responds with JSON under the text format, you can start using the data by converting it back to JSON first, which can be done like this:

$(eval const data = JSON.parse(`$(urlfetch json API_URL)`); data.success;)

It needs some changes: when you write a invalid username to give an error message, second i need for nightbot to say 'The "skin" cost "price"' skin i can replace with $(query) and the price with result after my thinking. Before I start create the command I need to research even more.And thanks for help.

You're asking for more than what you listed first, please include all the information when you create a topic so we don't go back and forth indefinitely, we're volunteers, our time is as precious as yours, respect it.

I can't help in the dark, I'd need a Steam userID to proceed, or the example of how a response looks like. By looking for the latter I stumbled upon the API's documentation, and I found out that the endpoint you want to use is deprecated, therefore I don't recommend making a command out of it, as it can stop responding tomorrow.