What the bot can do to a member, and how members are shown.
Answered from the cache, which needs guilds, channels, roles and the bot's
own user and member enabled (see Lingo.Cache). Anything missing gives
false, 0 or nil.
Summary
Functions
Whether the bot can ban a member.
The color a member's name is shown in, from their highest colored role, or 0.
The name a member is shown with: nickname, then global name, then username.
Like permissions/2, but {:ok, bitfield}, or {:error, {:missing_cache, resource}} naming what isn't cached.
Whether the bot can kick a member.
Whether the bot outranks a member, so it can change their nickname or roles. Nobody outranks the owner.
A member's guild-wide permissions bitfield, or 0 when required data is missing.
Functions
Whether the bot can ban a member.
The color a member's name is shown in, from their highest colored role, or 0.
The name a member is shown with: nickname, then global name, then username.
@spec fetch_permissions(String.t(), String.t()) :: {:ok, non_neg_integer()} | {:error, {:missing_cache, atom()}}
Like permissions/2, but {:ok, bitfield}, or {:error, {:missing_cache, resource}} naming what isn't cached.
Whether the bot can kick a member.
Whether the bot outranks a member, so it can change their nickname or roles. Nobody outranks the owner.
A member's guild-wide permissions bitfield, or 0 when required data is missing.