Class: Discorb::GuildTemplate::TemplateGuild

Inherits:
DiscordModel show all
Defined in:
lib/discorb/guild_template.rb

Overview

Represents a guild in guild template.

Defined Under Namespace

Classes: Channel, Role

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#afk_timeout -> Integer (readonly)

Returns The AFK timeout of the guild.

Returns:

  • (Integer)

    The AFK timeout of the guild.



98
99
100
# File 'lib/discorb/guild_template.rb', line 98

def afk_timeout
  @afk_timeout
end

#channels -> Discorb::Dictionary{Discorb::Snowflake => Discorb::GuildChannel} (readonly)

Returns A dictionary of channels in the guild.

Returns:



104
105
106
# File 'lib/discorb/guild_template.rb', line 104

def channels
  @channels
end

#default_message_notifications -> :all_messages, :only_mentions (readonly)

Returns The default message notification level of the guild.

Returns:

  • (:all_messages, :only_mentions)

    The default message notification level of the guild.



113
114
115
# File 'lib/discorb/guild_template.rb', line 113

def default_message_notifications
  @default_message_notifications
end

#description -> String (readonly)

Returns The description of the guild.

Returns:

  • (String)

    The description of the guild.



106
107
108
# File 'lib/discorb/guild_template.rb', line 106

def description
  @description
end

#explicit_content_filter -> :disabled_in_text, ... (readonly)

Returns The explict content filter level of the guild.

Returns:

  • (:disabled_in_text, :members_without_roles, :all_members)

    The explict content filter level of the guild.



115
116
117
# File 'lib/discorb/guild_template.rb', line 115

def explicit_content_filter
  @explicit_content_filter
end

#name -> String (readonly)

Returns The name of the guild.

Returns:

  • (String)

    The name of the guild.



96
97
98
# File 'lib/discorb/guild_template.rb', line 96

def name
  @name
end

#preferred_locale -> Symbol (readonly)

Note:

This modifies the language code, - will be replaced with _.

Returns The preffered language of the guild.

Returns:

  • (Symbol)

    The preffered language of the guild.



109
110
111
# File 'lib/discorb/guild_template.rb', line 109

def preferred_locale
  @preferred_locale
end

#roles -> Discorb::Dictionary{Discorb::Snowflake => Discorb::Role} (readonly)

Returns A dictionary of roles in the guild.

Returns:



100
101
102
# File 'lib/discorb/guild_template.rb', line 100

def roles
  @roles
end

#system_channel_flags -> Discorb::Guild::SystemChannelFlag (readonly)

Returns The flag for the system channel.

Returns:

  • (Discorb::Guild::SystemChannelFlag)

    The flag for the system channel.



102
103
104
# File 'lib/discorb/guild_template.rb', line 102

def system_channel_flags
  @system_channel_flags
end

#verification_level -> :none, ... (readonly)

Returns The verification level of the guild.

Returns:

  • (:none, :low, :medium, :high, :very_high)

    The verification level of the guild.



111
112
113
# File 'lib/discorb/guild_template.rb', line 111

def verification_level
  @verification_level
end

#widget_enabled -> Boolean (readonly) Also known as: widget_enabled?

Returns Whether the guild enabled the widget.

Returns:

  • (Boolean)

    Whether the guild enabled the widget.



117
118
119
# File 'lib/discorb/guild_template.rb', line 117

def widget_enabled
  @widget_enabled
end