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

ArchivedLibrary[API Development](/categories/api)

jacknoordhuis/discord-php
=========================

An unofficial library to assist with the interaction of the Discord gateway API.

v4.0.3(9y ago)1424MITPHPPHP ^5.6|^7.0

Since Aug 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/JackNoordhuis/DiscordPHP)[ Packagist](https://packagist.org/packages/jacknoordhuis/discord-php)[ RSS](/packages/jacknoordhuis-discord-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (13)Versions (24)Used By (0)

DiscordPHP
==========

[](#discordphp)

[![Build Status](https://camo.githubusercontent.com/065a522ee906e771fbc46ebe5f1488ca7bd1aa1c77783ca133d4a3099198eb3b/68747470733a2f2f7472617669732d63692e6f72672f7465616d7265666c65782f446973636f72645048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/teamreflex/DiscordPHP) [![Discord Chat](https://camo.githubusercontent.com/350f90e73d0eb8d441ca90c1944a055405a6256a7fd1702758f6d03a221276ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636861742d446973636f72642532304150492d626c75652e737667)](https://discord.gg/0SBTUU1wZTX4Mjwn) [![PHP Discorders](https://camo.githubusercontent.com/44042124a2de9b4289c1188d2da44c4590ee5447e396042a20e5ce5875fadfd5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636861742d504850253230446973636f72642d626c75652e737667)](https://discord.gg/0duG4FF1ElFGUFVq)

An unofficial library to interact with the Discord gateway API (continuation of [DiscordPHP](https://github.com/teamreflex/DiscordPHP)).

FAQ
---

[](#faq)

1. Can I run DiscordPHP on a webserver (e.g. Apache, nginx)?
    - No, DiscordPHP will only run in CLI. If you want to have an interface for your bot you can integrate [react/http](https://github.com/ReactPHP/http) with your bot and run it through CLI.

Getting Started
---------------

[](#getting-started)

### Installing DiscordPHP

[](#installing-discordphp)

DiscordPHP is installed using [Composer](https://getcomposer.org). Make sure you have installed Composer and are used to how it operates. We require a minimum PHP version of PHP 5.5.9, however it is reccomended that you use PHP 7. PHP 5.x support **will** be removed in the future.

This library has not been tested with HHVM.

1. Run `composer require team-reflex/discord-php`. This will install the lastest release.
    - If you would like, you can also install the development branch by running `composer require team-reflex/discord-php dev-develop`.
2. Include the Composer autoload file at the top of your main file:
    - `include __DIR__.'/vendor/autoload.php';`
3. Make a bot!

### Basic Example

[](#basic-example)

```
