elseifis_adminthen-- we won't try and ban moderators and administrators.
localoutput=language['ban']['2']
returnmattata.send_reply(message,output)
elseifstatus.result.status=='kicked'then-- check if the user has already been kicked
localoutput=language['ban']['4']
returnmattata.send_reply(message,output)
end
localsuccess=mattata.ban_chat_member(message.chat.id,user_object.id)-- attempt to ban the user from the group
ifnotsuccessthen-- since we've ruled everything else out, it's safe to say if it wasn't a success then the bot just isn't an administrator in the group