Class: Discorb::Application::Team
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::Application::Team
- Defined in:
- lib/discorb/application.rb
Overview
Represents a team for an application.
Defined Under Namespace
Classes: Member
Instance Attribute Summary collapse
-
#icon -> Discorb::Asset
readonly
The team's icon.
-
#id -> Discorb::Snowflake
readonly
The team's ID.
-
#members -> Discorb::Application::Team::Member
readonly
The team's member.
-
#name -> String
readonly
The team's name.
-
#owner_user_id -> Discorb::Snowflake
readonly
The team's owner's ID.
Instance Method Summary collapse
- #inspect -> Object
-
#owner -> Discorb::Application::Team::Member
The team's owner.
Methods inherited from DiscordModel
Instance Attribute Details
#icon -> Discorb::Asset (readonly)
Returns The team's icon.
98 99 100 |
# File 'lib/discorb/application.rb', line 98 def icon @icon end |
#id -> Discorb::Snowflake (readonly)
Returns The team's ID.
96 97 98 |
# File 'lib/discorb/application.rb', line 96 def id @id end |
#members -> Discorb::Application::Team::Member (readonly)
Returns The team's member.
104 105 106 |
# File 'lib/discorb/application.rb', line 104 def members @members end |
#name -> String (readonly)
Returns The team's name.
100 101 102 |
# File 'lib/discorb/application.rb', line 100 def name @name end |
#owner_user_id -> Discorb::Snowflake (readonly)
Returns The team's owner's ID.
102 103 104 |
# File 'lib/discorb/application.rb', line 102 def owner_user_id @owner_user_id end |
Instance Method Details
#inspect -> Object
131 132 133 |
# File 'lib/discorb/application.rb', line 131 def inspect "#<#{self.class} id=#{@id}>" end |
#owner -> Discorb::Application::Team::Member
The team's owner.
127 128 129 |
# File 'lib/discorb/application.rb', line 127 def owner @members.find { |m| m.user.id == @owner_user_id } end |