class OAuthApplication extends ClientBase (View source)

Represents an OAuth Application.

Properties

Client $client The client which initiated the instance. from ClientBase
static Client|null $serializeClient The client which will be used to unserialize. from ClientBase
string $id The application ID.
string $name The name of the application.
string|null $icon The hash of the application hash, or null.
string|null $description The application's description, or null.
string[]|null $rpcOrigins An array of RPC origin url strings, if RPC is enabled, or null.
bool $botPublic Whether the bot is public.
bool $botRequireCodeGrant Whether the bot requires a code grant (full OAuth flow).
User|null $owner The User instance of the owner, or null.

Methods

__construct(Client $client, array $application)

No description

__destruct()

Default destructor.

from Base
bool
__isset(string $name)

No description

from Base
mixed
__get(string $name)

No description

mixed
__call(string $name, array $args)

No description

from Base
mixed
jsonSerialize()

No description

string
serialize()

No description

void
unserialize($data)

No description

void
_patch(array $data)

No description

from Base
bool
_shouldUpdate(array $data)

No description

from Base
void
_markForDelete()

No description

from Base
mixed
__debugInfo()

No description

string|null
getIconURL(int|null $size = null, string $format = 'png')

Returns the application's icon URL, or null.

string
__toString()

Automatically converts to the application name.

Details

__construct(Client $client, array $application)

Parameters

Client $client
array $application

__destruct()

Default destructor.

bool __isset(string $name)

Parameters

string $name

Return Value

bool

Exceptions

Exception

mixed __get(string $name)

Parameters

string $name

Return Value

mixed

Exceptions

RuntimeException

mixed __call(string $name, array $args)

Parameters

string $name
array $args

Return Value

mixed

Exceptions

RuntimeException

mixed jsonSerialize()

Return Value

mixed

string serialize()

Return Value

string

void unserialize($data)

Parameters

$data

Return Value

void

void _patch(array $data)

Parameters

array $data

Return Value

void

bool _shouldUpdate(array $data)

Parameters

array $data

Return Value

bool

void _markForDelete()

Return Value

void

mixed __debugInfo()

Return Value

mixed

string|null getIconURL(int|null $size = null, string $format = 'png')

Returns the application's icon URL, or null.

Parameters

int|null $size One of 128, 256, 512, 1024 or 2048.
string $format One of png, jpg or webp.

Return Value

string|null

string __toString()

Automatically converts to the application name.

Return Value

string