PHPackages                             rubika/app - 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. rubika/app

Abandoned → [rubialib/rubikalib](/?search=rubialib%2Frubikalib)Library

rubika/app
==========

rubika library for making apps with PHP

v1.3(3y ago)114[1 issues](https://github.com/AmirrezaFiroz/rubika/issues)GPL-3.0PHPPHP &gt;=8

Since Jan 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AmirrezaFiroz/rubika)[ Packagist](https://packagist.org/packages/rubika/app)[ Docs](https://github.com/AmirrezaFiroz/rubika)[ RSS](/packages/rubika-app/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

rubika
======

[](#rubika)

rubika client for running bots with PHP. **use this client to make bots, games and ...**

usage
=====

[](#usage)

run this command on terminal

```
composer require rubika/app

```

1. create a new php file in current directory
2. require vendor and **Bot** class in file

```
require_once __DIR__ . '/vendor/autoload.php';

use Rubika\Bot;
```

3. now you can send messages

```
$bot = new Bot(9123456789);
$bot->sendMessage('u0FFeu...', 'سلام');
```

get message updates
===================

[](#get-message-updates)

for getting updates, you must create new class with a name and call it

```
require_once __DIR__ . '/vendor/autoload.php';

use Rubika\Client;

class myBot extends Client
{
    function onStart(): void # required !
    {
        echo 'bot running ... ';
    }

    function runBot(array $update) # required !
    {
        foreach ((isset($update['message']) ? $update['message'] : $update) as $message) {
            $message = isset($message['message']) ? $message['message'] : $message;
            $msg_id = $message['message_id'];
            $text = $message['text'];
            $type = $message['type'];
            $user_id = $message['author_object_guid'];

            $this->sendMessage($user_id, 'پیامتان دریافت شد ;)');
        }
    }
}

new myBot(9123456789);
```

error exceptions
================

[](#error-exceptions)

we created exception system for all possible errors you can catch them with try/catch :

```
use Rubika\Exception\Error;

try {
    $bot = new Bot(9123456789);
    $bot->sendMessage('u0FFeu...', 'سلام');
} catch (Error $e) {
    echo $e->getMessage();
}

// or for updates :

try {
    new myBot(9206634543);
} catch (Error $e) {
    echo $e->getMessage();
}
```

codedescribtion1invalid phone input2possible API errors (response)3not have an intenet connetion4API general error5invalid login code **input**6invalid twostep verifition password7login code time is expired8account session terminated error9login code is invalid10account session terminated error **(in web login mode)**11invalid message options12library cant find web index file13account new username is already exists on server and you can't set it as new username14invalid action15not file exists16file mie is invalid17invalid data passed18not understandable object ID19invalid join link20invalid username21invalid emailweb mode
========

[](#web-mode)

if you runs your bot on web page or want to make web page, we have a way too ;)

**Note :** with runnig on web page, Bot will active web mode automatic

```
require_once __DIR__ . '/vendor/autoload.php';

$page = Web(9123456789);
// $page = Web(9123456789, 'index.php'); you can add a custom index file
// index file:
//

$page->sendMessage("uFF...", 'سلام');
```

**\* web login feature will improve on the text versions ...**

fast mode
=========

[](#fast-mode)

you can get message updates without writing class or ...

```
require_once __DIR__ . '/vendor/autoload.php';

Fast(function ($update, $obj) {
    foreach ((isset($update['message']) ? $update['message'] : $update) as $message) {
        $message = isset($message['message']) ? $message['message'] : $message;
        $msg_id = $message['message_id'];
        $text = $message['text'];
        $type = $message['type'];
        $user_id = $message['author_object_guid'];

        $obj->sendMessage($user_id, 'پیامتان دریافت شد ;)');
    }
}, 9123456789);
```

auto send message action
========================

[](#auto-send-message-action)

now you can set auto send action mode to your media like send messgae, photo, ... .

```
Fast(function ($update, $obj) {
    // ...
        $obj->autoSendAction = true;
    // ...
}, 9123456789);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~27 days

Total

4

Last Release

1138d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e474af35cac59ff7c45a211aa38262bcc6315673750eaa843bf9f3306d5d773a?d=identicon)[AmirrezaFiroz](/maintainers/AmirrezaFiroz)

---

Top Contributors

[![AmirrezaFiroz](https://avatars.githubusercontent.com/u/121334966?v=4)](https://github.com/AmirrezaFiroz "AmirrezaFiroz (123 commits)")

---

Tags

botrubikarubika-librubika-libraryrubikalibrubikalibraryrubikarubikalibrubika-librubikalibraryrubika-library

### Embed Badge

![Health badge](/badges/rubika-app/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)

PHPackages © 2026

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