PHPackages                             woeler/phpdiscord - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. woeler/phpdiscord

ActiveLibrary[HTTP &amp; Networking](/categories/http)

woeler/phpdiscord
=================

A php library to use Discord webhooks and embeds.

4.0.1(3y ago)33133.2k—0%3GPL-3.0-or-laterPHPPHP ^8.1

Since Nov 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Woeler/discord-php)[ Packagist](https://packagist.org/packages/woeler/phpdiscord)[ Fund](https://woeler.dev)[ GitHub Sponsors](https://github.com/Woeler)[ RSS](/packages/woeler-phpdiscord/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

Discord-PHP
===========

[](#discord-php)

A PHP library that makes sending Discord webhooks easier. Supports plain-text messages and Discord embeds messages.

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

[](#installation)

```
composer require woeler/phpdiscord
```

Usage
-----

[](#usage)

Sending a text message

```
$message = (new DiscordTextMessage())
    ->setContent('Hello World')
    ->setAvatar('https://example.com/avatar.png')
    ->setUsername('Webhook Test');

$webhook = new DiscordWebhook('https://discordapp.com/api/webhooks/SomeWebHook');
$messageData = $webhook->send($message);
```

Sending an embed message

```
$message = (new DiscordEmbedMessage())
    ->setContent('Hello World')
    ->setAvatar('https://example.com/avatar.png')
    ->setUsername('Webhook Test')
    ->setTitle('Hello Title')
    ->setDescription('Some nice description')
    ->addField('Field name', 'Field value')
    ->setImage('https://example.com/someimage.png');

$webhook = new DiscordWebhook('https://discordapp.com/api/webhooks/SomeWebHook');
$messageData = $webhook->send($message);
```

Updating a message

```
$messageId = '12345';
$message = (new DiscordTextMessage())
    ->setContent('Hello World')
    ->setAvatar('https://example.com/avatar.png')
    ->setUsername('Webhook Test');

$webhook = new DiscordWebhook('https://discordapp.com/api/webhooks/SomeWebHook');
$messageData = $webhook->update($messageId, $message);
```

Deleting a message

```
$messageId = '12345';

$webhook = new DiscordWebhook('https://discordapp.com/api/webhooks/SomeWebHook');
$webhook->delete($messageId);
```

Getting a message

```
$messageId = '12345';

$webhook = new DiscordWebhook('https://discordapp.com/api/webhooks/SomeWebHook');
$messageData = $webhook->get($messageId);
```

Ratelimits are automatically handled for all calls.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% 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 ~190 days

Recently: every ~290 days

Total

9

Last Release

1149d ago

Major Versions

v1.1.1 → v2.0.02020-01-31

v2.0.0 → 3.0.02021-06-30

3.0.0 → 4.0.02022-06-10

PHP version history (4 changes)v1.0.0PHP &gt;=7.0.0

v2.0.0PHP &gt;=7.2.0

3.0.0PHP ^7.4|^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b2228466302c06de8c6ce989d284107a0960bfcf8bd9a75c8721e6ffc5bea0?d=identicon)[Woeler](/maintainers/Woeler)

---

Top Contributors

[![Woeler](https://avatars.githubusercontent.com/u/18422096?v=4)](https://github.com/Woeler "Woeler (24 commits)")[![c-wolfe](https://avatars.githubusercontent.com/u/11241823?v=4)](https://github.com/c-wolfe "c-wolfe (1 commits)")[![QartemisT](https://avatars.githubusercontent.com/u/63267788?v=4)](https://github.com/QartemisT "QartemisT (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/woeler-phpdiscord/health.svg)

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

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k775.6M1.6k](/packages/symfony-routing)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k72.4M286](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k302.1M1.0k](/packages/php-http-discovery)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k62.5M214](/packages/nelmio-api-doc-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k47.0M206](/packages/api-platform-core)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78125.8M374](/packages/react-http)

PHPackages © 2026

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