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)33136.0k↑43.7%3GPL-3.0-or-laterPHPPHP ^8.1

Since Nov 23Pushed 2y 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 3w ago

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

42

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity76

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

1243d 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://avatars.githubusercontent.com/u/18422096?v=4)[Woeler](/maintainers/Woeler)[@Woeler](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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