Who may use one of the app's commands in a guild — or every command, when id is the
application id.
Arrives with APPLICATION_COMMAND_PERMISSIONS_UPDATE. Each entry allows or denies a role, a
user or a channel. Two ids are constants rather than real ids: the guild id stands for
@everyone, and the guild id minus one for every channel — everyone?/2 and
all_channels?/2 recognise them.
Summary
Functions
Whether an entry targets every channel — a channel entry whose id is the guild id minus one.
Whether these permissions apply to every command of the app rather than one.
Whether an entry targets @everyone — a role entry whose id is the guild id.
Converts a raw guild application command permissions object into this struct.
Types
Functions
Whether an entry targets every channel — a channel entry whose id is the guild id minus one.
iex> EDA.Command.Permissions.all_channels?(%{id: "9", type: :channel}, "10")
true
Whether these permissions apply to every command of the app rather than one.
Whether an entry targets @everyone — a role entry whose id is the guild id.
iex> EDA.Command.Permissions.everyone?(%{id: "10", type: :role}, "10")
true
Converts a raw guild application command permissions object into this struct.