Nostrum.Cache.GuildCache.get

You're seeing just the function get, go back to Nostrum.Cache.GuildCache module for more information.

Specs

get(Nostrum.Struct.Guild.id()) ::
  {:ok, Nostrum.Struct.Guild.t()} | {:error, reason()}

Retrives a single Nostrum.Struct.Guild from the cache via its id.

Returns {:error, reason} if no result was found.

Examples

iex> Nostrum.Cache.GuildCache.get(0)
{:ok, %Nostrum.Struct.Guild{id: 0}}

iex> Nostrum.Cache.GuildCache.get(10)
{:error, :id_not_found_on_guild_lookup}