PHPackages                             hrishikesh214/discord-php-wrapper - 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. [API Development](/categories/api)
4. /
5. hrishikesh214/discord-php-wrapper

ActiveProject[API Development](/categories/api)

hrishikesh214/discord-php-wrapper
=================================

discord wrapper for php

v1.2(5y ago)221GPL-3.0-or-laterPHP

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hrishikesh214/discord-php-wrapper)[ Packagist](https://packagist.org/packages/hrishikesh214/discord-php-wrapper)[ RSS](/packages/hrishikesh214-discord-php-wrapper/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

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

[](#discord-php-wrapper)

`Create Dashboard Easily`
-------------------------

[](#create-dashboard-easily)

Installation
============

[](#installation)

```
composer require hrishikesh214/discord-php-wrapper
```

Now include `vendor/autoload.php` to your file !

Documentation
=============

[](#documentation)

`Creating Discord Client`
-------------------------

[](#creating-discord-client)

```
$discord = new Discord\Client("Bot token here");
```

`How to get Guild?`
-------------------

[](#how-to-get-guild)

Getting guild is easy!

```
$guild = $discord->get_guild(id:your_guild_id);
```

`Getting channels`
------------------

[](#getting-channels)

### With Channel ID

[](#with-channel-id)

```
$channel = $guild->get_channel(id:channel_id_here);
```

### With Name

[](#with-name)

```
$channel = $guild->get_channel(name:"channel name here");
```

You have to provide **exact name** of the channel!

### Getting All Channels

[](#getting-all-channels)

```
$channel = $guild->get_channel();
```

Gives all channels in a guild if **no parameter** is passed

`Getting Messages`
------------------

[](#getting-messages)

```
$channel = $guild->get_channel(id:message_id_here);
```

If **no parameter** is passed, then gives **multiple messages**

`Sending  a Message`
--------------------

[](#sending--a-message)

To do this you have to use Message class

```
$new_message = $channel->send("message here");
```

This will send simple message

### Sending Embeds

[](#sending-embeds)

```
    $embed = new Embed(data:[
    	'title' => 'Embed title here',
    	'desc' => 'Description of embed here',
    	'fields' => [
    		[
    			'name' => 'field1',
    			'value' => 'value1',
    			'inline' => true
    		],
    		[
    			'name' => 'field2',
    			'value' => 'value2',
    			'inline' => false
    		]
    	]
    ]);

    $new_message = $channel->send(embed:$embed);
```

We created Embed object first and then send with `$channel->send(embed:$embed)`. You can refer to Discord Developer Documention for elements of embed and pass in data parameter in **form of array**!

`Editing Message`
-----------------

[](#editing-message)

Easily Edit any message sent by bot!

```
    //Fetch Message from channel
    $message = $channel->get_message(id:message_id);

	//Edit simple messages
    $edited_msg = $message->edit(content:"new content");

	//Edit Embed = pass new embed object with new content
    $edited_msg = $message->edit(embed:$edited_embed);
```

Deleting Message
----------------

[](#deleting-message)

```
    //Fetch Message from channel
    $message = $channel->get_message(id:message_id);

	//Call delete() member of message
	$message->delete();
```

### Made with ❤️By [Hrishikesh](https://github.com/hrishikesh214)

[](#made-with-️by-hrishikesh)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

3

Last Release

1953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f12410a6e357207f3725664e97daa18bef9f4caac667dff23472dd12af7fb4c?d=identicon)[hrishikesh214](/maintainers/hrishikesh214)

---

Top Contributors

[![hrishikesh214](https://avatars.githubusercontent.com/u/61156101?v=4)](https://github.com/hrishikesh214 "hrishikesh214 (22 commits)")

### Embed Badge

![Health badge](/badges/hrishikesh214-discord-php-wrapper/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M987](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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