Nostrum.Cache.PresenceCache.get
You're seeing just the function
get
, go back to Nostrum.Cache.PresenceCache module for more information.
Specs
get(Nostrum.Struct.User.id(), Nostrum.Struct.Guild.id()) :: {:error, :presence_not_found} | {:ok, map()}
Retreives a presence for a user from the cache by guild and id.
If successful, returns {:ok, presence}
. Otherwise returns {:error, reason}
.
Example
case Nostrum.Cache.PresenceCache.get(111133335555, 222244446666) do
{:ok, presence} ->
"They're #{presence.status}"
{:error, _reason} ->
"They're dead Jim"
end