DiscordPHP-Http Documentation

RateLimit extends RuntimeException
in package

Represents a rate-limit given by Discord.

Tags
author

David Cole david.cole1340@gmail.com

Table of Contents

Properties

$global  : bool
Whether the rate-limit is global.
$retry_after  : float
Time in seconds of when to retry after.

Methods

__construct()  : mixed
Rate limit constructor.
__toString()  : string
Converts a rate-limit to a user-readable string.
getRetryAfter()  : float
Gets the retry after parameter.
isGlobal()  : bool
Gets the global parameter.

Properties

$global

Whether the rate-limit is global.

protected bool $global

$retry_after

Time in seconds of when to retry after.

protected float $retry_after

Methods

__construct()

Rate limit constructor.

public __construct(bool $global, float $retry_after) : mixed
Parameters
$global : bool
$retry_after : float

__toString()

Converts a rate-limit to a user-readable string.

public __toString() : string
Return values
string

getRetryAfter()

Gets the retry after parameter.

public getRetryAfter() : float
Return values
float

isGlobal()

Gets the global parameter.

public isGlobal() : bool
Return values
bool
On this page

Search results