What the bot can do in a channel.
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
Like permissions/2, but {:ok, bitfield}, or {:error, {:missing_cache, resource}} naming what isn't cached.
Whether the bot can manage a channel.
Whether the bot can delete a message: its own, or anyone's with Manage Messages.
A member's permissions bitfield in a channel, with overwrites applied, or 0 when data is missing.
Whether the bot can see a channel.
Functions
@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 manage a channel.
Whether the bot can delete a message: its own, or anyone's with Manage Messages.
A member's permissions bitfield in a channel, with overwrites applied, or 0 when data is missing.
Whether the bot can see a channel.