Nostrum.Permission.from_bit

You're seeing just the function from_bit, go back to Nostrum.Permission module for more information.

Specs

from_bit(bit()) :: {:ok, t()} | :error

Converts the given bit to a permission.

This function returns :error if bit does not map to a permission.

Examples

iex> Nostrum.Permission.from_bit(0x04000000)
{:ok, :change_nickname}

iex> Nostrum.Permission.from_bit(0)
:error