Class: Discordrb::Team
- Inherits:
-
Object
- Object
- Discordrb::Team
- Includes:
- IDObject
- Defined in:
- lib/discordrb/data/team.rb
Overview
A group of users that can manage applications.
Defined Under Namespace
Classes: Member
Instance Attribute Summary collapse
-
#icon_id ⇒ String?
readonly
The ID of this team's icon.
-
#members ⇒ Array<Member>
readonly
The members that are a part of this team.
-
#name ⇒ String
readonly
The name of this team.
-
#owner ⇒ Member
readonly
The owner of this team.
Attributes included from IDObject
Instance Method Summary collapse
-
#icon_url(format = 'webp') ⇒ String?
Utility method to get a team's icon URL.
Methods included from IDObject
#==, #creation_time, synthesise
Instance Attribute Details
#icon_id ⇒ String? (readonly)
Returns the ID of this team's icon.
16 17 18 |
# File 'lib/discordrb/data/team.rb', line 16 def icon_id @icon_id end |
#members ⇒ Array<Member> (readonly)
Returns the members that are a part of this team.
19 20 21 |
# File 'lib/discordrb/data/team.rb', line 19 def members @members end |
#name ⇒ String (readonly)
Returns the name of this team.
9 10 11 |
# File 'lib/discordrb/data/team.rb', line 9 def name @name end |
#owner ⇒ Member (readonly)
Returns the owner of this team.
12 13 14 |
# File 'lib/discordrb/data/team.rb', line 12 def owner @owner end |
Instance Method Details
#icon_url(format = 'webp') ⇒ String?
Utility method to get a team's icon URL.
34 35 36 |
# File 'lib/discordrb/data/team.rb', line 34 def icon_url(format = 'webp') API.team_icon_url(@id, @icon_id, format) if @icon_id end |