briqueaubob/restcord-enums

PHP 8.1 Enums for RestCord

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/briqueaubob/restcord-enums

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

This package is auto-updated.

Last update: 2026-01-06 05:39:49 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!