Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Discord Php Laravel Package

team-reflex/discord-php

DiscordPHP is a PHP wrapper for Discord’s REST, gateway, and voice APIs. Build Discord bots that run in CLI with ReactPHP-style async handling. Includes limited docs/class reference and community integrations like Laracord for Laravel.

View on GitHub
Deep Wiki
Context7

title: "Intro"

DiscordPHP is a wrapper for the Discord REST, WebSocket and Voice APIs. Built on top of ReactPHP components. This documentation is based off the latest release.

This documentation page will be moved to class reference. You can now access it here.

Requirements

  • PHP 8.0 CLI
    • Will not run on a webserver (FPM, CGI), you must run through CLI. A bot is a long-running process.
    • x86 (32-bit) PHP requires ext-gmp extension enabled for handling new Permission values.
  • ext-json for JSON parsing.
  • ext-zlib for gateway packet compression.

Recommended Extensions

  • One of ext-uv, ext-libev or evt-event (in order of preference) for a faster, and more performant event loop.
  • ext-mbstring if you may handle non-english characters.
  • ext-gmp if running 32-bit PHP.

Voice Requirements

  • x86_64 Windows, Linux or Darwin based OS.
    • If you are running on Windows, you must be using PHP 8.0.
  • ext-sodium for voice encryption.
  • FFmpeg

Development Environment Recommendations

We recommend using an editor with support for the Language Server Protocol. A list of supported editors can be found here. Here are some commonly used editors:

  • Visual Studio Code (built-in LSP support)
  • Vim/Neovim (with the coc.nvim plugin for LSP support)
  • PHPStorm (built-in PHP support)

We recommend installing PHP Intelephense alongside your LSP-equipped editor for code completion alongside other helpful features. There is no need to pay for the premium features, the free version will suffice.

Installation

Installation requries Composer.

To install the latest release:

> composer require team-reflex/discord-php

If you would like to run on the latest master branch:

> composer require team-reflex/discord-php dev-master

master can be substituted for any other branch name to install that branch.

Key Tips

As Discord is a real-time application, events come frequently and it is vital that your code does not block the ReactPHP event loop. Most, if not all, functions return promises, therefore it is vital that you understand the concept of asynchronous programming with promises. You can learn more about ReactPHP promises here.

Help

If you need any help, feel free to join the PHP Discorders Discord and someone should be able to give you a hand. We are a small community so please be patient if someone can't help you straight away.

Contributing

All contributions are welcome through pull requests in our GitHub repository. At the moment we would love contributions towards:

  • Unit testing
  • Documentation
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope