PHPackages                             m1lkin/looksmaxxer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. m1lkin/looksmaxxer

ActiveLibrary[API Development](/categories/api)

m1lkin/looksmaxxer
==================

A powerful, strictly typed PHP library for the MAX bot platform.

v1.0.1(5mo ago)013[1 issues](https://github.com/i0ze/looksmaxxer/issues)MITPHPPHP &gt;=8.2CI passing

Since Jan 16Pushed 5mo agoCompare

[ Source](https://github.com/i0ze/looksmaxxer)[ Packagist](https://packagist.org/packages/m1lkin/looksmaxxer)[ Docs](https://github.com/m1lkin/looksmaxxer)[ RSS](/packages/m1lkin-looksmaxxer/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Looksmaxxer
===========

[](#looksmaxxer)

Мощная, типизированная и удобная PHP библиотека для платформы ботов MAX.

Особенности
-----------

[](#особенности)

- **Bot Framework:** Встроенный класс `Bot` с поддержкой событий (`onMessage`, `onLocation`, `onCommand` и др.).
- **Режимы работы:** Поддержка как **Long Polling** (разработка), так и **Webhook** (продакшен).
- **Строгая типизация:** Использует PHP 8.2+, Enums и DTO.
- **Удобные геттеры:** Доступ к координатам и контактам через методы `$message->getLocation()`.
- **Безопасность:** Никаких "сырых" массивов при работе с клавиатурами и медиа.

Установка
---------

[](#установка)

```
composer require m1lkin/looksmaxxer
```

Быстрый старт
-------------

[](#быстрый-старт)

### 1. Обработка геолокации и контактов

[](#1-обработка-геолокации-и-контактов)

Когда пользователь нажимает кнопку запроса данных, боту приходит сообщение с вложением.

```
use Looksmaxxer\Bot;
use Looksmaxxer\Models\Update;
use Looksmaxxer\Client;
use Looksmaxxer\Models\Keyboard\InlineKeyboard;
use Looksmaxxer\Models\Keyboard\Button;
use Looksmaxxer\Builders\MessageBuilder;

$bot = new Bot('TOKEN');

// 1. Отправляем кнопку запроса
$bot->onCommand('start', function(Update $update, Client $client) {
    $kb = InlineKeyboard::create()
        ->addRow(Button::requestGeoLocation('Где я?', quick: true));

    $client->sendMessage(
        MessageBuilder::create(chatId: $update->chatId)
            ->text('Нажми на кнопку ниже:')
            ->inlineKeyboard($kb)
    );
});

// 2. Обрабатываем ответ
$bot->onLocation(function(Update $update, Client $client) {
    $location = $update->message->getLocation();
    echo "Широта: {$location->latitude}, Долгота: {$location->longitude}";
});

// Запуск (Long Polling для тестов)
$bot->start();
```

Использование в Production (Webhook)
------------------------------------

[](#использование-в-production-webhook)

Для боевого режима создайте файл (например, `webhook.php`), настройте веб-сервер на этот файл и укажите его URL в настройках бота.

```
// webhook.php
require 'vendor/autoload.php';

use Looksmaxxer\Bot;

$bot = new Bot('TOKEN');

$bot->onMessage(function($update, $client) {
    // Ваша логика
    $client->sendMessage(
        \Looksmaxxer\Builders\MessageBuilder::create(chatId: $update->chatId)->text('Привет из Webhook!')
    );
});

// Обработка входящего запроса
$bot->handleWebhook();
```

Фильтрация кнопок (Callback)
----------------------------

[](#фильтрация-кнопок-callback)

```
$bot->onCallbackQuery('confirm_order', function(Update $update, Client $client) {
    // Пользователь нажал кнопку с payload "confirm_order"
    $client->sendMessage(
        MessageBuilder::create(chatId: $update->chatId)->text('Заказ подтвержден!')
    );
});
```

Команды и Текст
---------------

[](#команды-и-текст)

```
$bot->onCommand('help', function($u, $c) { /* ... */ });

$bot->onText('/купи|продай/i', function($u, $c) {
    // Сработает на сообщения "купи", "Продай" и т.д.
});
```

Тестирование
------------

[](#тестирование)

```
vendor/bin/phpunit
```

Лицензия
--------

[](#лицензия)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance70

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

169d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.1PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17680304?v=4)[ioze](/maintainers/ioze)[@Ioze](https://github.com/Ioze)

---

Top Contributors

[![i0ze](https://avatars.githubusercontent.com/u/123355494?v=4)](https://github.com/i0ze "i0ze (6 commits)")

---

Tags

phpapisdkbotmaxchatbot

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/m1lkin-looksmaxxer/health.svg)

```
[![Health](https://phpackages.com/badges/m1lkin-looksmaxxer/health.svg)](https://phpackages.com/packages/m1lkin-looksmaxxer)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[clicksend/clicksend-php

351.6M11](/packages/clicksend-clicksend-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
