PHPackages                             code-a1/easyban - 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. code-a1/easyban

ActiveLibrary

code-a1/easyban
===============

A simple way to ban users with NovaGram

5111PHP

Since Mar 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/code-a1/EasyBan)[ Packagist](https://packagist.org/packages/code-a1/easyban)[ RSS](/packages/code-a1-easyban/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

EasyBan
=======

[](#easyban)

[![Total Downloads](https://camo.githubusercontent.com/f9b04b3ea42dc9f2c580e5bcc59b6b016dd12889eb34c559912dd0e26cd7f087/68747470733a2f2f706f7365722e707567782e6f72672f636f64652d61312f6561737962616e2f646f776e6c6f616473)](https://packagist.org/packages/code-a1/easyban)

> A simple way to ban users with NovaGram.

EasyBan is a simple library extension for [NovaGram](https://github.com/skrtdev/NovaGram) ([See novagram docs](https://docs.novagram.ga/prototypes.html)) that allows you to ban the users of your bot.

Installation via Composer
-------------------------

[](#installation-via-composer)

Install EasyBan via Composer

```
composer require code-a1/easyban dev-main
```

Manual installation
-------------------

[](#manual-installation)

To install EasyBan you must only download the file from the src folder (bot.php) and require it on the file of your bot.

Usage example
-------------

[](#usage-example)

Here a simple example that show how EasyBan works:

```

        $chat = $message->chat;
        $text = $message->text;

        if(explode(" ", $text)[0] === "/ban"){ //to ban a user you must only send /ban [user_id]

            $Bot->banUser(explode(" ", $text)[1]);
            $chat->sendMessage("User Banned!");

        }

        if(explode(" ", $text)[0] === "/unban"){ //to unban a user you must only send /unban [user_id]

            $Bot->unbanUser(explode(" ", $text)[1]);
            $chat->sendMessage("User unBanned!");

        }
```

Methods
-------

[](#methods)

- isBanned() : You can use this method to check if a user is banned
- banUser() : You can use this method to ban a user
- unbanUser() : You can use this method to unBan a user

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/470ce445149c6892aa113daf8fb129cd7fc57a9e720b09d1942e9fd9468e7fdf?d=identicon)[code-a1](/maintainers/code-a1)

---

Top Contributors

[![code-a1](https://avatars.githubusercontent.com/u/68858676?v=4)](https://github.com/code-a1 "code-a1 (28 commits)")[![skrtdev](https://avatars.githubusercontent.com/u/64538010?v=4)](https://github.com/skrtdev "skrtdev (1 commits)")

### Embed Badge

![Health badge](/badges/code-a1-easyban/health.svg)

```
[![Health](https://phpackages.com/badges/code-a1-easyban/health.svg)](https://phpackages.com/packages/code-a1-easyban)
```

PHPackages © 2026

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