class Discorb::GuildTemplate::TemplateGuild
Represents a guild in guild template.
Attributes
@return [Integer] The AFK timeout of the guild.
@return [Discorb::Dictionary{Discorb::Snowflake => Discorb::GuildChannel}] A dictionary of channels in the guild.
@return [:all_messages, :only_mentions] The default message notification level of the guild.
@return [String] The description of the guild.
@return [:disabled_in_text, :members_without_roles, :all_members] The explict content filter level of the guild.
@return [String] The name of the guild.
@return [Symbol] The preffered language of the guild. @note This modifies the language code, `-` will be replaced with `_`.
@return [Discorb::Dictionary{Discorb::Snowflake => Discorb::Role}] A dictionary of roles in the guild.
@return [Discorb::Guild::SystemChannelFlag] The flag for the system channel.
@return [:none, :low, :medium, :high, :very_high] The verification level of the guild.
@return [Boolean] Whether the guild enabled the widget.
@return [Boolean] Whether the guild enabled the widget.
Public Class Methods
@!visibility private
# File lib/discorb/guild_template.rb, line 121 def initialize(data) @name = data[:name] @description = data[:description] @region = data[:region] @verification_level = Discorb::Guild.mfa_levels[data[:verification_level]] @default_message_notifications = Discorb::Guild.notification_levels[data[:default_message_notifications]] @explicit_content_filter = Discorb::Guild.explicit_content_filter[data[:explicit_content_filter]] @preferred_locale = data[:preferred_locale] @afk_timeout = data[:afk_timeout] @roles = data[:roles].map { |r| Role.new(r) } @channels = data[:channels].map { |c| Channel.new(c) } @system_channel_flags = Discorb::SystemChannelFlag.new(data[:system_channel_flags]) end