Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Application::role_connections_verification_url #1017

Merged
merged 2 commits into from
Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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."
Expand Down
14 changes: 5 additions & 9 deletions guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,24 @@ DiscordPHP is a wrapper for the Discord REST, WebSocket and Voice APIs. Built on
Requirements
============

- `PHP 8.0 CLI<https://php.net>`_ or higher
- `PHP 8.0<https://php.net>`_ 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.

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

Expand All @@ -63,7 +59,7 @@ We recommend installing `PHP Intelephense <https://intelephense.com/>`_ alongsid
Installation
============

Installation requries `Composer <https://getcomposer.org>`_.
Installation requires `Composer <https://getcomposer.org>`_.

To install the latest release::

Expand Down
47 changes: 25 additions & 22 deletions src/Discord/Parts/OAuth/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -75,6 +77,7 @@ class Application extends Part
'tags',
'install_params',
'custom_install_url',
'role_connections_verification_url',
];

public const GATEWAY_PRESENCE = (1 << 12);
Expand Down