[Custom API] How can I get a JSON urlfetch?

I am trying to get the curret online users on my discord server. https://discord.com/api/guilds/699186567129989137/widget.json

I want to get the presence_count parameter.

This is what i’ve got

$(eval ($(urlfetch json https://discord.com/api/guilds/699186567129989137/widget.json; : `${api[1][0]} - ${api[3][0]}`))

Already answered in Discord:

$(eval api=$(urlfetch json https://discord.com/api/guilds/699186567129989137/widget.json); api.presence_count)

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