Avoid throwing errors on weird accounts

This commit is contained in:
Aidan 2023-04-21 14:50:52 +01:00
parent e6a2a4d9bc
commit 1c1804d85d
Signed by: 9382
GPG Key ID: 9BF9CD918201F681

View File

@ -108,7 +108,9 @@ commands:Add('user',{},'user <username|mention|"me">', function(t)
local verificationAssetId = API:GetVerificationItemID(id) local verificationAssetId = API:GetVerificationItemID(id)
local verificationDate = "Not verified" local verificationDate = "Not verified"
if verificationAssetId.data[1] then if verificationAssetId.errors then
verificationDate = "Failed to fetch"
elseif verificationAssetId.data[1] then
verificationDate = GuessDateFromAssetID(verificationAssetId.data[1].instanceId) verificationDate = GuessDateFromAssetID(verificationAssetId.data[1].instanceId)
end end