briqueaubob/restcord-enums

PHP 8.1 Enums for RestCord

v1.0.0 2021-12-05 20:06 UTC

This package is auto-updated.

Last update: 2025-08-06 04:39:53 UTC


README

What is this?

This is a PHP 8.1 Enums package to use with RestCord on your projects. It can be used with another library like DiscordPHP or your own Discord REST API wrapper.

Requirements:

  • PHP 8.1

Usage example

Create a new voice channel:

<?php

use RestCord\DiscordClient;
use RestCord\Enums\ChannelType;

$client = new DiscordClient([ 'token' => 'bot-token' ]);
$client->guild->createGuildChannel([
    'guild.id' => 81384788765712384,
    'name' => 'new-channel',
    'type' => ChannelType::GUILD_VOICE->value
])

Missing enums?

Do a pull request or an issue and I will update the package!