Class: Discorb::Application::Team

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

Overview

Represents a team for an application.

Defined Under Namespace

Classes: Member

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#icon -> Discorb::Asset (readonly)

Returns The team's icon.

Returns:



62
63
64
# File 'lib/discorb/application.rb', line 62

def icon
  @icon
end

#id -> Discorb::Snowflake (readonly)

Returns The team's ID.

Returns:



60
61
62
# File 'lib/discorb/application.rb', line 60

def id
  @id
end

#members -> Discorb::Application::Team::Member (readonly)

Returns The team's member.

Returns:



68
69
70
# File 'lib/discorb/application.rb', line 68

def members
  @members
end

#name -> String (readonly)

Returns The team's name.

Returns:

  • (String)

    The team's name.



64
65
66
# File 'lib/discorb/application.rb', line 64

def name
  @name
end

#owner_user_id -> Discorb::Snowflake (readonly)

Returns The team's owner's ID.

Returns:



66
67
68
# File 'lib/discorb/application.rb', line 66

def owner_user_id
  @owner_user_id
end

Instance Method Details

#inspect -> Object



89
90
91
# File 'lib/discorb/application.rb', line 89

def inspect
  "#<#{self.class} id=#{@id}>"
end

#owner -> Discorb::Application::Team::Member

The team's owner.

Returns:



85
86
87
# File 'lib/discorb/application.rb', line 85

def owner
  @members.find { |m| m.user.id == @owner_user_id }
end