View Source Nostrum.Struct.Guild.Member.Flags (Nostrum v0.10.0)
Struct representing the flags a guild member can have.
Summary
Types
Member is exempt from guild verification requirements
Member has completed onboarding
Member has left and rejoined the guild
Member has started onboarding
Functions
Constructs a flag struct based on an integer from the Discord API, normally from Nostrum.Struct.Guild.Member.flags/0
.
Convert a flag struct to an integer value.
Types
@type bypasses_verification() :: boolean()
Member is exempt from guild verification requirements
@type completed_onboarding() :: boolean()
Member has completed onboarding
@type did_rejoin() :: boolean()
Member has left and rejoined the guild
@type flags() :: %Nostrum.Struct.Guild.Member.Flags{ bypasses_verification: bypasses_verification(), completed_onboarding: completed_onboarding(), did_rejoin: did_rejoin(), started_onboarding: started_onboarding() }
@type started_onboarding() :: boolean()
Member has started onboarding
@type t() :: flags()
Functions
Constructs a flag struct based on an integer from the Discord API, normally from Nostrum.Struct.Guild.Member.flags/0
.
Examples
iex> Nostrum.Struct.Guild.Member.Flags.from_integer(9)
%Nostrum.Struct.Guild.Member.Flags{
did_rejoin: true,
completed_onboarding: false,
bypasses_verification: false,
started_onboarding: true
}
Convert a flag struct to an integer value.
Examples
iex> my_flags = %Nostrum.Struct.Guild.Member.Flags{
...> did_rejoin: true,
...> completed_onboarding: false,
...> bypasses_verification: false,
...> started_onboarding: true
...> }
iex> Nostrum.Struct.Guild.Member.Flags.to_integer(my_flags)
9