So I'm making a discord bot for my Hypixel guild's discord. (I don't know other languages.) I want to be able to check Hypixel's API and grab the Guild ranks, and I know how to get to the API with Reqn and Sk-Json as I've gotten the other things from the API, jus the issue is with getting ranks.
All it does is return none for the red part of the code.
Code:
discord command -ginfo <text>:
trigger:
send request to url("https://api.hypixel.net/player?key={@APIKey}&name=%arg-1%")
map json body of last http response to {_results::*}
set {_u} to {_results::player::uuid}
send request to url("https://api.hypixel.net/guild?key={@APIKey}&player=%{_u}%")
map json body of last http response to {_results2::*}
set {_pn} to arg-1
set {_gn} to {_results2::guild::name}
set {_gr} to {_results2::guild::members::uuid::%{_u}%::rank}
set {_gr} to "Test"
stop loop
create embed:
set color of the embed to green
set title of the embed to "%arg-1% Guild Stats"
set description of the embed to "Name: %{_pn}%%newline%Guild: %{_gn}%%newline%Rank: %{_gr}%"
set icon of the embed to "https://crafatar.com/renders/head/%{_u}%?overlay"
set footer of embed to "Renders provided by crafatar.com"
reply with the last made embed
Last edited: