PHPackages                             matmper/php-discord-webhook - 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. matmper/php-discord-webhook

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

matmper/php-discord-webhook
===========================

Sample and cleand package to send messages to your discord channel

2.0.2(1y ago)22.6kMITPHPPHP ^7.1|^8.0

Since Aug 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/matmper/php-discord-webhook)[ Packagist](https://packagist.org/packages/matmper/php-discord-webhook)[ RSS](/packages/matmper-php-discord-webhook/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

PHP Discord Webhook
===================

[](#php-discord-webhook)

Sample and cleand package to send messages to your discord channel. Easily!

[![image](https://private-user-images.githubusercontent.com/8351960/258297913-08ffca66-82d4-466b-b41d-f1802502786e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ1MTg3MjIsIm5iZiI6MTc3NDUxODQyMiwicGF0aCI6Ii84MzUxOTYwLzI1ODI5NzkxMy0wOGZmY2E2Ni04MmQ0LTQ2NmItYjQxZC1mMTgwMjUwMjc4NmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMjZUMDk0NzAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTkwYWJkMDIwYzUzZjY1ZjUzMzAzZWI2MWIzMDA0ZmM2NzQwZTRkNjdiZDhkZmIyMTNiNDg3Y2FmOTZlMTQ5OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Wgu0lbsvNLsWHTej2Oe-lcjZv6nJwlnS6tDkgBdUeJU)](https://private-user-images.githubusercontent.com/8351960/258297913-08ffca66-82d4-466b-b41d-f1802502786e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ1MTg3MjIsIm5iZiI6MTc3NDUxODQyMiwicGF0aCI6Ii84MzUxOTYwLzI1ODI5NzkxMy0wOGZmY2E2Ni04MmQ0LTQ2NmItYjQxZC1mMTgwMjUwMjc4NmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMjZUMDk0NzAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTkwYWJkMDIwYzUzZjY1ZjUzMzAzZWI2MWIzMDA0ZmM2NzQwZTRkNjdiZDhkZmIyMTNiNDg3Y2FmOTZlMTQ5OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Wgu0lbsvNLsWHTej2Oe-lcjZv6nJwlnS6tDkgBdUeJU)Dependences
===========

[](#dependences)

- PHP ^7.1 | ^8.0
- Webhook Link ([Discord Doc](https://support.discord.com/hc/en-us/articles/228383668-Usando-Webhooks))

Install &amp; Usage
===================

[](#install--usage)

Install this repository in with composer:

```
$ composer require matmper/php-discord-webhook
```

Configure application envs values:

*Applications without env files support, we recommend [using version 1.x](https://github.com/matmper/php-discord-webhook/tree/1.1.0)*

```
# REQUIRED (https://discord.com/api/webhooks/{ID}/{TOKEN})
DISCORD_WEBHOOK_ID=
DISCORD_WEBHOOK_TOKEN=

# OPTIONAL (DEFAULT VALUE)
APP_NAME="no application"
APP_ENV="undefined"
DISCORD_WEBHOOK_BOT_NAME="Webhook BOT"
```

Send a message:

```
$sendWebhook = new \Matmper\DiscordWebhook();
$sendWebhook->message('message')->send();
```

Set custom Discord ID and Token and send a message:

```
$sendWebhook = new \Matmper\DiscordWebhook('DISCORD_ID', 'DISCORD_TOKEN');
$sendWebhook->message('message')->send();
```

Send a typed message:

```
use Matmper\Enums\MessageType;
$sendWebhook->type(MessageType::SUCCESS)->message('message')->send();
$sendWebhook->type(MessageType::WARNING)->message('message')->send();
$sendWebhook->type(MessageType::DANGER)->message('message')->send();
```

ValueEnumColorsuccessMessageType::SUCCESS\#2ecc71warningMessageType::WARNING\#e74c3cdangerMessageType::DANGER\#f1c40fdefaultMessageType::DEFAULT\#3498db---

Contribution &amp; Development
------------------------------

[](#contribution--development)

This is an open source code, free for distribution and contribution. All contributions will be accepted only with Pull Request and that pass the test and code standardization.

Run composer install in yout development and create env file

```
$ composer install --dev --prefer-dist
$ cp ./tests/.env.example .env
```

Edit `./tests/.env` and configure envs values. Execute `$ composer check`.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

4

Last Release

679d ago

Major Versions

1.1.0 → 2.0.02023-12-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ebbba804257345da231efbb8a00e9eb80383359990fd9e860c3c6ed7e42eb46?d=identicon)[matmper](/maintainers/matmper)

---

Top Contributors

[![matmper](https://avatars.githubusercontent.com/u/8351960?v=4)](https://github.com/matmper "matmper (36 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/matmper-php-discord-webhook/health.svg)

```
[![Health](https://phpackages.com/badges/matmper-php-discord-webhook/health.svg)](https://phpackages.com/packages/matmper-php-discord-webhook)
```

PHPackages © 2026

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