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

t()

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

Link to this type

bypasses_verification()

View Source (since 0.9.1)
@type bypasses_verification() :: boolean()

Member is exempt from guild verification requirements

Link to this type

completed_onboarding()

View Source (since 0.9.1)
@type completed_onboarding() :: boolean()

Member has completed onboarding

Link to this type

did_rejoin()

View Source (since 0.9.1)
@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()
}
Link to this type

started_onboarding()

View Source (since 0.9.1)
@type started_onboarding() :: boolean()

Member has started onboarding

@type t() :: flags()

Functions

Link to this function

from_integer(flag_value)

View Source (since 0.9.1)
@spec from_integer(integer()) :: t()

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
}
Link to this function

to_integer(flag_struct)

View Source (since 0.9.1)
@spec to_integer(t()) :: integer()

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