Nostrum.Struct.Guild.SystemChannelFlags (nostrum v0.11.0-dev)

View Source

Struct representing the flags on a guild's system channel

Summary

Types

Suppress server setup tips

Hide member join sticker reply buttons

Suppress member join notifications

Suppress server boost notifications

Suppress role subscription purchase and renewal notifications

Hide role subscription sticker reply buttons

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

flags()

@type flags() :: %Nostrum.Struct.Guild.SystemChannelFlags{
  suppress_guild_reminder_notifications:
    suppress_guild_reminder_notifications(),
  suppress_join_notification_replies: suppress_join_notification_replies(),
  suppress_join_notifications: suppress_join_notifications(),
  suppress_premium_subscriptions: suppress_premium_subscriptions(),
  suppress_role_subscription_purchase_notification_replies:
    suppress_role_subscription_purchase_notifications_replies(),
  suppress_role_subscription_purchase_notifications:
    suppress_role_subscription_purchase_notifications()
}

suppress_guild_reminder_notifications()

@type suppress_guild_reminder_notifications() :: boolean()

Suppress server setup tips

suppress_join_notification_replies()

@type suppress_join_notification_replies() :: boolean()

Hide member join sticker reply buttons

suppress_join_notifications()

@type suppress_join_notifications() :: boolean()

Suppress member join notifications

suppress_premium_subscriptions()

@type suppress_premium_subscriptions() :: boolean()

Suppress server boost notifications

suppress_role_subscription_purchase_notifications()

@type suppress_role_subscription_purchase_notifications() :: boolean()

Suppress role subscription purchase and renewal notifications

suppress_role_subscription_purchase_notifications_replies()

@type suppress_role_subscription_purchase_notifications_replies() :: boolean()

Hide role subscription sticker reply buttons

t()

@type t() :: flags()

Functions

from_integer(flag_value)

@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.SystemChannelFlags.from_integer(3)
%Nostrum.Struct.Guild.SystemChannelFlags{
  suppress_guild_reminder_notifications: false,
  suppress_join_notification_replies: false,
  suppress_join_notifications: true,
  suppress_premium_subscriptions: true,
  suppress_role_subscription_purchase_notification_replies: false,
  suppress_role_subscription_purchase_notifications: false
}

to_integer(flag_struct)

@spec to_integer(t()) :: integer()

Convert a flag struct to an integer value.

Examples

iex> my_flags = %Nostrum.Struct.Guild.SystemChannelFlags{
...>               suppress_join_notifications: true,
...>               suppress_join_notification_replies: true
...> }
iex> Nostrum.Struct.Guild.SystemChannelFlags.to_integer(my_flags)
9