Nostrum.Cache.GuildCache.select

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

Specs

select(Nostrum.Struct.Guild.id(), selector()) ::
  {:ok, any()} | {:error, reason()}

Selects values using a selector from a Nostrum.Struct.Guild.

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

Examples

iex> Nostrum.Cache.GuildCache.select(0, fn guild -> guild.id end)
{:ok, 0}

iex> Nostrum.Cache.GuildCache.select(10, fn guild -> guild.id end)
{:error, :id_not_found_on_guild_lookup}