Fix "Last Online" status #7
@ -260,13 +260,10 @@ function API:GetRobloxInfoFromUserId(USER_ID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function API:GetRobloxInfoFromUsername(USERNAME)
|
function API:GetRobloxInfoFromUsername(USERNAME)
|
||||||
if not USERNAME then return 'empty id' end
|
if not USERNAME then return 'empty username' end
|
||||||
local err, res = parseToURLArgs({username=USERNAME})
|
local response,headers = http_request('POST', ROBLOX_API_URL..'usernames/users', API_HEADER, {usernames={USERNAME}})
|
||||||
if err then return err end
|
if not response.data[1] then return 'invalid username' end
|
||||||
local response,headers = http_request('GET', ROBLOX_API_URL2..'users/get-by-username'..res, API_HEADER)
|
return self:GetRobloxInfoFromUserId(response.data[1].id)
|
||||||
if not response.Id then return 'no user found' end
|
|
||||||
local response2 = http_request('GET', ROBLOX_API_URL..'users/'..response.Id, API_HEADER)
|
|
||||||
return response2
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function API:GetRobloxInfoFromDiscordId(DISCORD_ID)
|
function API:GetRobloxInfoFromDiscordId(DISCORD_ID)
|
||||||
|
Loading…
Reference in New Issue
Block a user