PHPackages                             xsloom/xatbotstat - 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. xsloom/xatbotstat

ActiveProject[API Development](/categories/api)

xsloom/xatbotstat
=================

A PHP library for xat BOTSTAT API.

1.0.1(7y ago)1101MITPHPPHP &gt;=7.1

Since Apr 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xSlOom/xatBotstat)[ Packagist](https://packagist.org/packages/xsloom/xatbotstat)[ RSS](/packages/xsloom-xatbotstat/feed)WikiDiscussions master Synced 2mo ago

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

xatBotstat
==========

[](#xatbotstat)

[![Build Status](https://camo.githubusercontent.com/06a53b4e10e160543a358e14cc9b475dd24d2aa2df7fe6a7708bf321c7dbdc31/68747470733a2f2f7472617669732d63692e6f72672f78536c4f6f6d2f786174426f74737461742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xSlOom/xatBotstat)

A PHP library for xat botstat API. The goal of this repository is to give the ability for developers to use botstat api properly and easier.

Requirements
------------

[](#requirements)

- PHP 7.2
- Composer

Getting Started
---------------

[](#getting-started)

To get started, clone this repository and run `composer install`

If you have no project running, you can run this:

`composer create-project xsloom/xatbotstat`.

or simply add it to your project:

`composer require xsloom/xatbotstat`.

How to use?
-----------

[](#how-to-use)

Here is an example of use:

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

use xatBotstat\Botstat;

$botStat = new Botstat('MYTOKEN', 5, 110110);
$botStat::setUserName('SLOOM');
$botStat::setUserAvatar('https://i.imgur.com/mwfzvKw.png');
$result = $botStat::sendToXat();

echo ($result['error'] ? 'An error occured: ' . $result['message'] : 'OK');

```

Botstat class requires 3 arguments:

- Token - You can get it on xat.com/login and replace "MYTOKEN" by your token
- Room ID
- User ID

Functions
=========

[](#functions)

> setUsername($name)

This allows you to set a new name.

> setUserAvatar($avatar)

This allows you to set a new avatar.

> setUserHomepage($home)

This allows you to set a new homepage.

> setUserStatus($status)

This allows you to set a new status. Note: You cannot set a name and a status in same time.

> sendToXat()

This will send the current data set to the botstat API.

Errors
------

[](#errors)

As every apis in the world, they often return errors when something went wrong. The error code is often at the beginnig of the error message.

Here is the errors list:

- ERROR 1: The selected room was not found.
- ERROR 5: The user was not found on the chatroom
- ERROR 6: The user needs status power enabled/set
- ERROR 7: The user needs botstat power
- ERROR 9: Too many request. 3 packets each 20 seconds.
- ERROR 10: Nothing to do. You didn't provide a correct parameter.

Contribution
------------

[](#contribution)

We know that things are never perfect. If you find an issue or if you have a suggestion to improve, feel free to open a pull request and i'll take a look at it quickly.

Authors
-------

[](#authors)

- **Clément** - [xSlOom](https://github.com/xSlOom)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

2572d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/664442b4b4f9432794f5fe17e3f8c4cf15ff5c22f5b798b08ae35606df90ccc0?d=identicon)[xSlOom](/maintainers/xSlOom)

---

Top Contributors

[![xSlOom](https://avatars.githubusercontent.com/u/14977438?v=4)](https://github.com/xSlOom "xSlOom (17 commits)")

---

Tags

apibotstatcomposerphpxatxatechphpapixatxatechbotstat

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xsloom-xatbotstat/health.svg)

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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