Elixir v0.2.1 Nostrum.Cache.Guild.GuildServer

Module for interacting with Guild Servers.

Summary

Functions

Retrieves a guild from the cache

Functions

get(arg1)
get([{:id, integer}] | [{:channel_id, integer}] | Nostrum.Struct.Message.t) ::
  {:error, atom} |
  {:ok, Nostrum.Struct.Guild.t}

Retrieves a guild from the cache.

Returns {:ok, Nostrum.Struct.Guild.t} if found, {:error, reason} otherwise.

Example

case Nostrum.Cache.Guild.GuildServer.get(id: 1234567891234789) do
  {:ok, guild} -> "Guild has #{length(guild.members)} members"
  {:error, _reason} -> "Guild is MIA"
end
get!(list)