From d797fc822c24ce74cfaa9a653eb5f889bca1177b Mon Sep 17 00:00:00 2001 From: SQKo <87897282+SQKo@users.noreply.github.com> Date: Tue, 13 Dec 2022 19:43:21 +0700 Subject: [PATCH 1/2] update dependency --- README.md | 2 +- composer.json | 4 ++-- guide/index.rst | 14 +++++--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c2791f7a1..c8b3ab3a3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Before you start using this Library, you **need** to know how PHP works, you nee #### Recommended Extensions -- One of [`ext-uv`](https://github.com/amphp/ext-uv) (recommended), `ext-libev` or `ext-event` for a faster, and more performant event loop. +- One of [`ext-uv`](https://github.com/amphp/ext-uv) (recommended), `ext-ev` or `ext-event` for a faster, and more performant event loop. - [`ext-mbstring`](https://www.php.net/manual/en/book.mbstring.php) if handling non-latin characters. #### Voice Requirements diff --git a/composer.json b/composer.json index 4b13538d0..ac107bdfb 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "react/event-loop": "^1.2", "ext-json": "*", "ext-zlib": "*", - "discord-php/http": "^10.1.3", + "discord-php/http": "^10.1.7", "react/child-process": "^0.6.3", "discord/interactions": "^2.2", "react/async": "^4.0 || ^3.0", @@ -45,7 +45,7 @@ "suggest": { "ext-gmp": "For 64 bit calculations on x86 (32 bit) PHP.", "ext-uv": "For a faster, and more performant loop. Preferred.", - "ext-libev": "For a faster, and more performant loop.", + "ext-ev": "For a faster, and more performant loop.", "ext-event": "For a faster, and more performant loop.", "ext-mbstring": "For accurate calculations of string length when handling non-english characters.", "clue/zlib-react": "For gateway message transport compression with zlib-stream." diff --git a/guide/index.rst b/guide/index.rst index e00e09c2d..032c328e6 100644 --- a/guide/index.rst +++ b/guide/index.rst @@ -22,10 +22,10 @@ DiscordPHP is a wrapper for the Discord REST, WebSocket and Voice APIs. Built on Requirements ============ -- `PHP 8.0 CLI`_ or higher +- `PHP 8.0`_ or higher + 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. + + x86 (32-bit) PHP requires ``ext-gmp`` extension enabled. - ``ext-json`` for JSON parsing. - ``ext-zlib`` for gateway packet compression. @@ -33,17 +33,13 @@ Requirements Recommended Extensions ---------------------- -- One of ``ext-uv``, ``ext-libev`` or ``evt-event`` (in order of preference) for a faster, and more performant event loop. +- One of ``ext-uv``, ``ext-ev`` 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. - +- 64-bit PHP - ``ext-sodium`` for voice encryption. - FFmpeg @@ -63,7 +59,7 @@ We recommend installing `PHP Intelephense `_ alongsid Installation ============ -Installation requries `Composer `_. +Installation requires `Composer `_. To install the latest release:: From 88738d4808ad719aaf10bd77708a43c58d7ad8b9 Mon Sep 17 00:00:00 2001 From: SQKo <87897282+SQKo@users.noreply.github.com> Date: Tue, 13 Dec 2022 19:50:46 +0700 Subject: [PATCH 2/2] Add Application::$role_connections_verification_url --- src/Discord/Parts/OAuth/Application.php | 47 +++++++++++++------------ 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/Discord/Parts/OAuth/Application.php b/src/Discord/Parts/OAuth/Application.php index 99d42ddc8..a821d9904 100644 --- a/src/Discord/Parts/OAuth/Application.php +++ b/src/Discord/Parts/OAuth/Application.php @@ -23,28 +23,30 @@ * * @since 7.0.0 * - * @property string $id The client ID of the OAuth application. - * @property string $name The name of the OAuth application. - * @property string|null $icon The icon URL of the OAuth application. - * @property string $icon_hash The icon hash of the OAuth application. - * @property string $description The description of the OAuth application. - * @property string[] $rpc_origins An array of RPC origin URLs. - * @property bool $bot_public When false only app owner can join the app's bot to guilds. - * @property bool $bot_require_code_grant When true the app's bot will only join upon completion of the full oauth2 code grant flow. - * @property string|null $terms_of_service_url The url of the app's terms of service. - * @property string|null $privacy_policy_url The url of the app's privacy policy - * @property User|null $owner The owner of the OAuth application. - * @property string $verify_key The hex encoded key for verification in interactions and the GameSDK's GetTicket. - * @property object|null $team If the application belongs to a team, this will be a list of the members of that team. - * @property string|null $guild_id If this application is a game sold on Discord, this field will be the guild to which it has been linked. - * @property string|null $primary_sku_id If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists. - * @property string|null $slug If this application is a game sold on Discord, this field will be the URL slug that links to the store page. - * @property string|null $cover_image The application's default rich presence invite cover image URL. - * @property string|null $cover_image_hash The application's default rich presence invite cover image hash. - * @property int $flags The application's public flags. - * @property string[]|null $tags Up to 5 tags describing the content and functionality of the application. - * @property object|null $install_params Settings for the application's default in-app authorization link, if enabled. - * @property string|null $custom_install_url The application's default custom authorization link, if enabled. + * @property string $id The client ID of the OAuth application. + * @property string $name The name of the OAuth application. + * @property string|null $icon The icon URL of the OAuth application. + * @property string $icon_hash The icon hash of the OAuth application. + * @property string $description The description of the OAuth application. + * @property string[] $rpc_origins An array of RPC origin URLs. + * @property bool $bot_public When false only app owner can join the app's bot to guilds. + * @property bool $bot_require_code_grant When true the app's bot will only join upon completion of the full oauth2 code grant flow. + * @property string|null $terms_of_service_url The url of the app's terms of service. + * @property string|null $privacy_policy_url The url of the app's privacy policy + * @property User|null $owner The owner of the OAuth application. + * @property string $verify_key The hex encoded key for verification in interactions and the GameSDK's GetTicket. + * @property object|null $team If the application belongs to a team, this will be a list of the members of that team. + * @property string|null $guild_id If this application is a game sold on Discord, this field will be the guild to which it has been linked. + * @property string|null $primary_sku_id If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists. + * @property string|null $slug If this application is a game sold on Discord, this field will be the URL slug that links to the store page. + * @property string|null $cover_image The application's default rich presence invite cover image URL. + * @property string|null $cover_image_hash The application's default rich presence invite cover image hash. + * @property int $flags The application's public flags. + * @property string[]|null $tags Up to 5 tags describing the content and functionality of the application. + * @property object|null $install_params Settings for the application's default in-app authorization link, if enabled. + * @property string|null $custom_install_url The application's default custom authorization link, if enabled. + * @property string|null $role_connections_verification_url The application's role connection verification entry point, which when configured will render the app as a verification method in the guild role verification configuration. + * * @property string $invite_url The invite URL to invite the bot to a guild. * * @property GlobalCommandRepository $commands The application global commands. @@ -75,6 +77,7 @@ class Application extends Part 'tags', 'install_params', 'custom_install_url', + 'role_connections_verification_url', ]; public const GATEWAY_PRESENCE = (1 << 12);