PHPackages                             valgorithms/pzbot - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. valgorithms/pzbot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

valgorithms/pzbot
=================

Valgorithm's offical Discord bot for Project Zomboid built in ReactPHP.

10PHP

Since Dec 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Valgorithms/PZBot)[ Packagist](https://packagist.org/packages/valgorithms/pzbot)[ RSS](/packages/valgorithms-pzbot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PZ BOT for DiscordPHP
=====================

[](#pz-bot-for-discordphp)

This is a PZ BOT class for DiscordPHP. It provides functionalities for interacting with Discord using PHP.

Installation
------------

[](#installation)

Before you start, make sure you have PHP installed on your machine. This BOT class requires PHP CLI to run.

1. Clone this repository to your local machine.
2. Navigate to the project directory.
3. Install the required dependencies. This project requires the `Monolog` library for logging and the `BigInt` extension for big integer operations. If you're using Composer, you can install these dependencies by running `composer install`.

Usage
-----

[](#usage)

To use the PZ BOT class, you need to create an instance of the class and pass an options array to the constructor. The options array should include the following keys:

- `discordToken`: Your Discord bot token.
- `clientId`: Your Discord client ID.
- `clientSecret`: Your Discord client secret.
- `guild_id`: The ID of the guild (server) that the bot is connected to.
- `channel_ids`: An associative array mapping channel names to their IDs.
- `role_ids`: An associative array mapping role names to their IDs.
- `loop`: An instance of the ReactPHP event loop.
- `discord`: An instance of the DiscordPHP client.
- `rcon`: An instance of the RCON client.

Here's an example of how to use the PZ BOT class:

```
$options = [
    'discordToken' => 'your_discord_token',
    'clientId' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
    'guild_id' => 'your_guild_id',
    'channel_ids' => [
        'pz-players' => 'channel_id', // Channel name will automatically update with the # of players
        // Add more channels as needed
    ],
    'role_ids' => [
        'role_name' => 'role_id',
        // Add more roles as needed
    ],
    'loop' => $loop,
    'discord' => $discord,
    'rcon' => $rcon,
];

$bot = new PZ\BOT($options);
$bot->run();
```

Replace 'your\_discord\_token', 'your\_client\_id', 'your\_client\_secret', 'your\_guild\_id', 'channel\_name', 'channel\_id', 'role\_name', 'role\_id', $loop, $discord, and $rcon with your actual values. Also, you might need to adjust the installation and usage instructions based on your actual project setup and requirements.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request with any enhancements, bug fixes, or other contributions.

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for more details.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f85d19ae7440b91717206e5e67342bae2dcc1c8de0a6f4333bbb75b18212d0f?d=identicon)[valzargaming](/maintainers/valzargaming)

---

Top Contributors

[![valzargaming](https://avatars.githubusercontent.com/u/7202504?v=4)](https://github.com/valzargaming "valzargaming (29 commits)")

### Embed Badge

![Health badge](/badges/valgorithms-pzbot/health.svg)

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

###  Alternatives

[garetjax/phpbrowscap

Standalone replacement for php's native get\_browser() function

437862.4k5](/packages/garetjax-phpbrowscap)[workerman/crontab

A crontab written in PHP based on workerman

70164.2k58](/packages/workerman-crontab)[fof/nightmode

Add a Night Mode option for your users to use on your Flarum forum

3774.5k2](/packages/fof-nightmode)[mdixon18/fontawesome

A FontAwesome Nova field.

15196.6k](/packages/mdixon18-fontawesome)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

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