1
0
forked from tommy/tommy-bot

advanced user parsing with string patterns

This commit is contained in:
tommy aka doge
2022-08-22 02:55:02 -04:00
parent 9b4c586659
commit 5864eb7c48
3 changed files with 75 additions and 46 deletions

View File

@ -36,7 +36,7 @@ commands:Add('user',{},'user <username|mention|"me">', function(t)
local user_info=API:GetUserFromAny(user,message)
if type(user_info)=='string' then return message:reply('```'..user_info..'```') end
-- for a,b in next,user_info do user_info[a]=tostring(b)end
local description = user_info.description
local description = user_info.description=='' and 'null' or user_info.description
local created = tostring(date.fromISO(user_info.created):toSeconds())
local current = date():toSeconds()
local accountAge = round((current-created)/86400)
@ -66,8 +66,7 @@ commands:Add('user',{},'user <username|mention|"me">', function(t)
{name='Last Online',value='<t:'..round(LastOnline)..':R>',inline=true},
{name='Last Location',value=LastLocation,inline=true},
{name='Banned',value=isBanned,inline=true},
{name='Description',value=description or 'None',inline=false},
{name='Description',value=description,inline=false},
}
}
message:reply({embed=embed})