Discord Elixir v1.1.18 DiscordEx.Permissions View Source

Easily assign permissions with this helper module.

Link to this section Summary

Functions

Add any permission to an existing set of permissions and return the complete permission value

Remove any permission from an existing set of permissions and return updated value

Take current permission value and convert it to a map of permissions

Link to this section Functions

Link to this function add(existing_permissions \\ 0, new_permission) View Source
add(integer(), atom()) :: integer()

Add any permission to an existing set of permissions and return the complete permission value.

Link to this function remove(existing_permissions, new_permission) View Source
remove(integer(), atom()) :: integer()

Remove any permission from an existing set of permissions and return updated value.

Link to this function to_map(permissions) View Source
to_map(integer()) :: map()

Take current permission value and convert it to a map of permissions.