tempban.help='/tempban [user] <length> - Temporarily bans a user from the current chat for the given length. The length should be in the format 1y2mo3w4d5h6m7s. Some natural language is supported too. Temp-bans must be a minimum of 60 seconds in length. This command can only be used by moderators and administrators of a supergroup.'
returnmattata.send_reply(message,'You must specify a length when using this command! This should be in the format 1y2mo3w4d5h6m7s. Some natural language is supported too. Temp-ban must be a minimum of 60 seconds in length.')
elseifnotuserthen
returnmattata.send_reply(message,'You must specify a user to temp-ban. This can be done by mention, reply or ID.')
end
until_date=os.time()+until_date
localuser_object=mattata.get_user(user)-- resolve the username/ID to a user object