View Source Nostrum.Api.Ratelimiter (Nostrum v0.6.1)

Ratelimit implementation specific to Discord's API. Only to be used when starting in a rest-only manner.

Link to this section Summary

Types

Return values of start functions.

Functions

Returns a specification to start this module under a supervisor.

Empties all buckets, voiding any saved ratelimit values.

Retrieves a proper ratelimit endpoint from a given route and url.

Callback implementation for GenServer.init/1.

Starts the ratelimiter.

Link to this section Types

Specs

on_start() ::
  {:ok, pid()} | :ignore | {:error, {:already_started, pid()} | term()}

Return values of start functions.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

empty_buckets() :: true

Empties all buckets, voiding any saved ratelimit values.

Link to this function

get_endpoint(route, method)

View Source

Specs

get_endpoint(String.t(), String.t()) :: String.t()

Retrieves a proper ratelimit endpoint from a given route and url.

Callback implementation for GenServer.init/1.

Specs

start_link([]) :: on_start()

Starts the ratelimiter.