Remedy.Cache (Remedy v0.6.7) View Source
Functions for interracting with the cache.
The cache is populated only by events received from the gateway, it is not updated from interractions with the REST api.
Link to this section Summary
Functions
Fetch a ban from the Cache by user_id & guild_id
Unsafe proxy definition for fetch_ban/2
.
Fetch a channel from the cache.
Unsafe proxy definition for fetch_channel/1
.
Fetch a guild from the cache
Unsafe proxy definition for fetch_guild/1
.
Fetch an integration by ID.
Fetch a role from the cache.
Unsafe proxy definition for fetch_role/1
.
Fetch a user from the cache.
Unsafe proxy definition for fetch_user/1
.
List all bans
Unsafe proxy definition for list_bans/0
.
List channels from the cache.
Unsafe proxy definition for list_channels/1
.
List all bans associated with a guild.
Unsafe proxy definition for list_guild_bans/1
.
List Members
List all bans associated with a user.
Unsafe proxy definition for list_user_bans/1
.
Unsafe proxy definition for update_role/2
.
Returns True/False to the user being banned from a guild.
Link to this section Types
Specs
attrs() :: map()
Specs
changeset() :: Ecto.Changeset.t()
Specs
reason() :: String.t()
Specs
snowflake() :: Snowflake.t()
Link to this section Functions
Specs
fetch_ban(snowflake(), snowflake()) :: {:error, reason()} | {:ok, Remedy.Schema.Ban.t()}
Fetch a ban from the Cache by user_id & guild_id
Unsafe proxy definition for fetch_ban/2
.
Specs
fetch_channel(snowflake()) :: {:error, reason()} | {:ok, Remedy.Schema.Channel.t()}
Fetch a channel from the cache.
Unsafe proxy definition for fetch_channel/1
.
Fetch a guild from the cache
Unsafe proxy definition for fetch_guild/1
.
Fetch an integration by ID.
Specs
fetch_role(any()) :: {:error, :not_found} | {:ok, Remedy.Schema.Role.t()}
Fetch a role from the cache.
Returns {:ok, %Role{}} or {:error, reason}
Unsafe proxy definition for fetch_role/1
.
Fetch a user from the cache.
Returns {:ok, %User{}} or {:error, reason}
Unsafe proxy definition for fetch_user/1
.
Specs
get_ban(snowflake(), snowflake()) :: nil | Remedy.Schema.Ban.t()
Specs
list_bans() :: {:error, reason()} | {:ok, [Remedy.Schema.Ban.t()]}
List all bans
Unsafe proxy definition for list_bans/0
.
Specs
list_channels(snowflake()) :: {:error, term()} | {:ok, [Remedy.Schema.Channel.t()]}
List channels from the cache.
Unsafe proxy definition for list_channels/1
.
Specs
list_guild_bans(snowflake()) :: {:error, reason()} | {:ok, [Remedy.Schema.Ban.t()]}
List all bans associated with a guild.
Unsafe proxy definition for list_guild_bans/1
.
List Members
Specs
list_user_bans(snowflake()) :: {:error, reason()} | {:ok, [Remedy.Schema.Ban.t()]}
List all bans associated with a user.
Unsafe proxy definition for list_user_bans/1
.
Specs
remove_message_reactions(snowflake()) :: {:ok, Remedy.Schema.Message.t()} | {:error, reason()}
Unsafe proxy definition for update_role/2
.
Specs
Returns True/False to the user being banned from a guild.