View Source Nostrum.Struct.User.Flags (Nostrum v0.8.0)
Struct representing the flags a user account can have
Link to this section Summary
Types
Bug Hunter (Level 1)
Bug Hunter (Level 2)
Early Supporter
HypeSquad Balance
HypeSquad Bravery
HypeSquad Brilliance
HypeSquad Events
Discord Partner
Discord Employee
System user
Team User
Verified bot
Verified developer
Functions
Constructs a flag struct based on an integer from the Discord API (either public_flags or flags).
Convert a flag struct to an integer value.
Link to this section Types
@type bug_hunter_level_1() :: boolean()
Bug Hunter (Level 1)
@type bug_hunter_level_2() :: boolean()
Bug Hunter (Level 2)
@type early_supporter() :: boolean()
Early Supporter
@type flags() :: %Nostrum.Struct.User.Flags{ bug_hunter_level_1: bug_hunter_level_1(), bug_hunter_level_2: bug_hunter_level_2(), early_supporter: early_supporter(), hypesquad_balance: hypesquad_balance(), hypesquad_bravery: hypesquad_bravery(), hypesquad_brilliance: hypesquad_brilliance(), hypesquad_events: hypesquad_events(), partner: partner(), staff: staff(), system: system(), team_user: team_user(), verified_bot: verified_bot(), verified_developer: verified_developer() }
@type hypesquad_balance() :: boolean()
HypeSquad Balance
@type hypesquad_bravery() :: boolean()
HypeSquad Bravery
@type hypesquad_brilliance() :: boolean()
HypeSquad Brilliance
@type hypesquad_events() :: boolean()
HypeSquad Events
@type partner() :: boolean()
Discord Partner
@type staff() :: boolean()
Discord Employee
@type system() :: boolean()
System user
@type t() :: flags()
@type team_user() :: boolean()
Team User
@type verified_bot() :: boolean()
Verified bot
@type verified_developer() :: boolean()
Verified developer
Link to this section Functions
Constructs a flag struct based on an integer from the Discord API (either public_flags or flags).
examples
Examples
iex> Nostrum.Struct.User.Flags.from_integer(131842)
%Nostrum.Struct.User.Flags{
bug_hunter_level_1: false,
bug_hunter_level_2: false,
early_supporter: true,
hypesquad_balance: true,
hypesquad_bravery: false,
hypesquad_brilliance: false,
hypesquad_events: false,
partner: true,
staff: false,
system: false,
team_user: false,
verified_bot: false,
verified_developer: true
}
Convert a flag struct to an integer value.
examples
Examples
iex> my_flags = %Nostrum.Struct.User.Flags{
...> bug_hunter_level_1: false,
...> bug_hunter_level_2: false,
...> early_supporter: true,
...> hypesquad_balance: true,
...> hypesquad_bravery: false,
...> hypesquad_brilliance: false,
...> hypesquad_events: false,
...> partner: true,
...> staff: false,
...> system: false,
...> team_user: false,
...> verified_bot: false,
...> verified_developer: true
...> }
iex> Nostrum.Struct.User.Flags.to_integer(my_flags)
131842