doesn't really matter
This commit is contained in:
parent
9279e4dc88
commit
3d211facf6
@ -265,8 +265,9 @@ end
|
|||||||
|
|
||||||
function API:GetRobloxInfoFromUsername(USERNAME)
|
function API:GetRobloxInfoFromUsername(USERNAME)
|
||||||
if not USERNAME then return 'empty username' end
|
if not USERNAME then return 'empty username' end
|
||||||
|
if #USERNAME > 32 then return 'Username too long' end
|
||||||
local response,headers = http_request('POST', ROBLOX_API_URL..'usernames/users', API_HEADER, {usernames={USERNAME}})
|
local response,headers = http_request('POST', ROBLOX_API_URL..'usernames/users', API_HEADER, {usernames={USERNAME}})
|
||||||
if not response.data[1] then return 'invalid username' end
|
if not response.data[1] then return 'Username \''..USERNAME..'\' not found.' end
|
||||||
return self:GetRobloxInfoFromUserId(response.data[1].id)
|
return self:GetRobloxInfoFromUserId(response.data[1].id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ local function Callback(Interaction, Command, Args)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not user_info.id then
|
if not user_info.id then
|
||||||
return error('stop doing that')
|
return error(user_info)
|
||||||
end
|
end
|
||||||
|
|
||||||
local description = user_info.description=='' and 'This user has no description' or user_info.description
|
local description = user_info.description=='' and 'This user has no description' or user_info.description
|
||||||
|
Loading…
Reference in New Issue
Block a user