From 1c1804d85db762157024064cd1bc9975b9dadcae Mon Sep 17 00:00:00 2001 From: 9382 Date: Fri, 21 Apr 2023 14:50:52 +0100 Subject: [PATCH] Avoid throwing errors on weird accounts --- src/modules/commands/user.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/commands/user.lua b/src/modules/commands/user.lua index 0f36de5..f21f950 100644 --- a/src/modules/commands/user.lua +++ b/src/modules/commands/user.lua @@ -108,7 +108,9 @@ commands:Add('user',{},'user ', function(t) local verificationAssetId = API:GetVerificationItemID(id) 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) end