PHPackages                             mistynetwork/discordwebhookapi - 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. mistynetwork/discordwebhookapi

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

mistynetwork/discordwebhookapi
==============================

Simple discord webhook virion for PocketMine-MP

402[1 PRs](https://github.com/MistyNetwork/discordwebhookapi/pulls)PHP

Since Mar 21Pushed 1y agoCompare

[ Source](https://github.com/MistyNetwork/discordwebhookapi)[ Packagist](https://packagist.org/packages/mistynetwork/discordwebhookapi)[ RSS](/packages/mistynetwork-discordwebhookapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

🌍 DiscordWebhookAPI
===================

[](#-discordwebhookapi)

**DiscordWebhookAPI** is an **asynchronous** **PocketMine-MP** library that allows sending messages and embeds to **Discord** using **webhooks** easily. It uses the [libasynCurl](https://github.com/NetherGamesMC/libasynCurl) library for handling asynchronous requests.

---

📌 API Registration
------------------

[](#-api-registration)

Before using the API, it's important to register the class to avoid conflicts with other plugins. If you do not check for registration, it will throw an exception.

```
use reacherurmom\discordwebhookapi\DiscordWebhookAPI;
use pocketmine\plugin\PluginBase;

class MyMain extends PluginBase {

    protected function onEnable() : void {
        if (!DiscordWebhookAPI::isRegistered()) {
            DiscordWebhookAPI::register($this);
        }
    }
}
```

---

📜 Using Messages and Embeds
---------------------------

[](#-using-messages-and-embeds)

### 📌 Creating a Message

[](#-creating-a-message)

```
use reacherurmom\discordwebhookapi\Message;

$message = Message::create()
    ->setUsername("ReacherUrMom Bot")
    ->setAvatar("https://example.com/avatar.png")
    ->setContent("Hi! This is my bot");
```

### 📌 Adding an Embed

[](#-adding-an-embed)

```
use reacherurmom\discordwebhookapi\Embed;

$embed = Embed::create("Embed Title")
    ->setDescription("This is an embedded message.")
    ->setColor(hexdec('ffffff'));

$message->addEmbed($embed);
```

### 📌 Embed Methods

[](#-embed-methods)

```
use reacherurmom\discordwebhookapi\component\Footer;
use reacherurmom\discordwebhookapi\component\Author;
use reacherurmom\discordwebhookapi\component\Field;

$embed->setFooter(Footer::create("Footer Text", "https://example.com/footer.png"))
      ->setAuthor(Author::create("Author Name", "https://example.com/author.png"))
      ->setTimestamp(new \DateTime('now')->setTimezone('UTC'))
      ->setThumbnail("https://example.com/thumbnail.png")
      ->addField(Field::create("Field 1", "Value of field 1", true))
      ->addField(Field::create("Field 2", "Value of field 2", false));
```

---

🚀 Sending the Message
---------------------

[](#-sending-the-message)

```
use reacherurmom\discordwebhookapi\DiscordWebhookAPI;

$webhook = "your_webhook_url";
DiscordWebhookAPI::create($webhook, $message)->send();
```

---

🙌 Credits
---------

[](#-credits)

- [JuqnGOOD](https://github.com/JkqzDev)
- [CortexPE](https://github.com/CortexPE/DiscordWebhookAPI)

---

📦 Adding the API to Your Project
--------------------------------

[](#-adding-the-api-to-your-project)

You can install this API using **Composer**:

```
composer require mistynetwork/discordwebhookapi
```

---

📜 License
---------

[](#-license)

This project is **free to use**. For more details, check the [LICENSE](https://github.com/MistyNetwork/discordwebhookapi/blob/main/LICENSE).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

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/2105867daeb5eb4886aa090c04d2834878ec3fedf134a1b992aaa243bfdfdfbf?d=identicon)[reacherurmom](/maintainers/reacherurmom)

---

Top Contributors

[![reacherurmom](https://avatars.githubusercontent.com/u/201276535?v=4)](https://github.com/reacherurmom "reacherurmom (15 commits)")

### Embed Badge

![Health badge](/badges/mistynetwork-discordwebhookapi/health.svg)

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

###  Alternatives

[cweagans/composer-patches

Provides a way to patch Composer packages.

1.7k94.2M762](/packages/cweagans-composer-patches)

PHPackages © 2026

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