Skip to content

shellbot/DiscordPHP

 
 

Repository files navigation

DiscordPHP Build Status

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

Special Thanks

Todo

Todo list is available in the TODO.md file.

Basic WebSocket client

<?php

include 'vendor/autoload.php';

use Discord\Discord;
use Discord\WebSockets\Event;
use Discord\WebSockets\WebSocket;

$discord = new Discord(':email', ':password');
$websocket = new WebSocket($discord);

$websocket->on(Event::MESSAGE_CREATE, function ($message, $discord, $new) {
	echo "New message from {$message->author->username}: {$message->content}".PHP_EOL;
});

$websocket->run();

Documentation

Documentation can be found here, however it is very basic at the moment. If you need more help please ask as it says below.

Help

If you need any help feel free to join the DiscordAPI Server and ask in the #php_discordphp channel. Tag @Uniquoooo if you need any help specific to the API.

Other Libraries

Here is a list of the other libraries that are being worked on and their Discord usernames!

.NET

Go

Java

Node.js

PHP

Python

Ruby

Scala

Contributing

We are open to anyone contributing as long as you follow our code standards. We use PSR-4 for our autoloading standard and PSR-2 for our code formatting standard. Please, if you send in pull requests follow these standards.

About

An API to interact with the popular messaging app Discord

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%