PHPackages                             laravel-discord/yasmin - 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. laravel-discord/yasmin

Abandoned → [team-reflex/discord-php](/?search=team-reflex%2Fdiscord-php)ArchivedLibrary[API Development](/categories/api)

laravel-discord/yasmin
======================

Yasmin is a Discord API library for PHP.

v1.2.0(5y ago)88.5k6[1 issues](https://github.com/laravel-discord/Yasmin/issues)2Apache-2.0PHPPHP ^7.3||^8.0

Since Mar 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/laravel-discord/Yasmin)[ Packagist](https://packagist.org/packages/laravel-discord/yasmin)[ RSS](/packages/laravel-discord-yasmin/feed)WikiDiscussions origin Synced yesterday

READMEChangelog (2)Dependencies (10)Versions (35)Used By (2)

Yasmin [![Build Status](https://camo.githubusercontent.com/df7e9e75d490db56b8a58583dce1b8977524983ca82e5b2c06ea6f7498ac075f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436861726c6f74746544756e6f69732f5961736d696e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/CharlotteDunois/Yasmin/build-status/master)
=================================================================================================================================================================================================================================================================================================================================================================

[](#yasmin-)

Yasmin is a Discord API library for PHP. Yasmin connects to the Gateway and interacts with the REST API.

This library is **only** for PHP 7.1 (and later) and use in CLI. Only bot accounts are supported by Yasmin.

Before you start
================

[](#before-you-start)

Before you start using this Library, you **need** to know how PHP works, you need to know the language and you need to know how Event Loops and Promises work. This is a fundamental requirement before you start. Without this knowledge, you will only suffer.

See  for resources.

Getting Started
===============

[](#getting-started)

Getting started with Yasmin is pretty straight forward. All you need to do is to use [composer](https://packagist.org/packages/charlottedunois/yasmin) to install Yasmin and its dependencies. After that, you can include composer's autoloader into your file and start interacting with Discord and Yasmin!

```
composer require charlottedunois/yasmin

```

It is important to listen to `error` events. If you don't attach an `error` listener, the event emitter will throw an exception.

Make sure you also have a rejection handler for all promises, as unhandled promise rejections get swallowed and you will never know what happened to them.

**Important Information**: All properties on class instances, which are implemented using a magic method (which means pretty much all properties), are **throwing** if the property doesn't exist.

There is a WIP Gitbook with a few protips in it, feel free to read it:

Example
=======

[](#example)

This is a fairly trivial example of using Yasmin. You should put all your listener code into try-catch blocks and handle exceptions accordingly.

```
// Include composer autoloader

$loop = \React\EventLoop\Factory::create();
$client = new \CharlotteDunois\Yasmin\Client(array(), $loop);

$client->on('error', function ($error) {
    echo $error.PHP_EOL;
});

$client->on('ready', function () use ($client) {
    echo 'Logged in as '.$client->user->tag.' created on '.$client->user->createdAt->format('d.m.Y H:i:s').PHP_EOL;
});

$client->on('message', function ($message) {
    echo 'Received Message from '.$message->author->tag.' in '.($message->channel instanceof \CharlotteDunois\Yasmin\Interfaces\DMChannelInterface ? 'DM' : 'channel #'.$message->channel->name ).' with '.$message->attachments->count().' attachment(s) and '.\count($message->embeds).' embed(s)'.PHP_EOL;
});

$client->login('YOUR_TOKEN')->done();
$loop->run();
```

Voice Support
=============

[](#voice-support)

There is no voice support.

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

[](#documentation)

Windows and SSL
===============

[](#windows-and-ssl)

Unfortunately PHP on Windows does not have access to the Windows Certificate Store. This is an issue because TLS gets used and as such certificate verification gets applied (turning this off is **not** an option).

You will notice this issue by your script exiting immediately after one loop turn without any errors. Unfortunately there is for some reason no error or exception.

As such users of this library need to download a [Certificate Authority extract](https://curl.haxx.se/docs/caextract.html) from the cURL website.
The path to the caextract must be set in the [`php.ini`](https://secure.php.net/manual/en/openssl.configuration.php) for `openssl.cafile`.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~12 days

Total

31

Last Release

1971d ago

Major Versions

v0.9.3 → v1.0.0-beta.12020-10-28

PHP version history (3 changes)v0.4.0PHP &gt;=7.1

v0.9.0PHP &gt;=7.1||^8.0

v1.0.0-beta.1PHP ^7.3||^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77618633?v=4)[Revolution](/maintainers/revolution)[@Revolution](https://github.com/Revolution)

---

Top Contributors

[![AdamHebby](https://avatars.githubusercontent.com/u/18214951?v=4)](https://github.com/AdamHebby "AdamHebby (3 commits)")[![sylae](https://avatars.githubusercontent.com/u/2791628?v=4)](https://github.com/sylae "sylae (2 commits)")[![arcdigital](https://avatars.githubusercontent.com/u/551002?v=4)](https://github.com/arcdigital "arcdigital (1 commits)")[![ChalyFlavour](https://avatars.githubusercontent.com/u/15111583?v=4)](https://github.com/ChalyFlavour "ChalyFlavour (1 commits)")[![Hunman](https://avatars.githubusercontent.com/u/7405480?v=4)](https://github.com/Hunman "Hunman (1 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (1 commits)")

### Embed Badge

![Health badge](/badges/laravel-discord-yasmin/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-discord-yasmin/health.svg)](https://phpackages.com/packages/laravel-discord-yasmin)
```

###  Alternatives

[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[web3p/web3.php

Ethereum web3 interface.

1.3k325.5k41](/packages/web3p-web3php)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

113154.9k1](/packages/clue-docker-react)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)[clue/reactphp-eventsource

Instant real-time updates. Lightweight EventSource client receiving live messages via HTML5 Server-Sent Events (SSE). Fast stream processing built on top of ReactPHP's event-driven architecture.

5818.5k3](/packages/clue-reactphp-eventsource)[wyrihaximus/json-psr7

JSON encode and decode PSR-7 requests and responses

1167.7k](/packages/wyrihaximus-json-psr7)

PHPackages © 2026

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