Discord Elixir v1.1.4 DiscordEx.Permissions

Easily assign permissions with this helper module.

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

Functions

add(existing_permissions \\ 0, new_permission)

Specs

add(integer, atom) :: integer

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

remove(existing_permissions, new_permission)

Specs

remove(integer, atom) :: integer

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

to_map(permissions)

Specs

to_map(integer) :: map

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