Class: Team

Team

Represents a Client OAuth2 Application Team.

Constructor

new Team()

Source:

Extends

Members

(readonly) client :Client

The client that instantiated this
Type:
Overrides:
Source:

(readonly) createdAt :Date

The time the team was created at
Type:
  • Date
Source:

(readonly) createdTimestamp :number

The timestamp the team was created at
Type:
  • number
Source:

(nullable) icon :string

The Team's icon hash
Type:
  • string
Source:

id :Snowflake

The ID of the Team
Type:
Source:

members :Collection.<Snowflake, TeamMember>

The Team's members
Type:
Source:

name :string

The name of the Team
Type:
  • string
Source:

(readonly, nullable) owner :TeamMember

The owner of this team
Type:
Source:

(nullable) ownerID :string

The Team's owner id
Type:
  • string
Source:

Methods

iconURL(optionsopt) → {string}

A link to the teams's icon.
Parameters:
Name Type Attributes Default Description
options ImageURLOptions <optional>
{} Options for the Image URL
Source:
Returns:
URL to the icon
Type
string

toString() → {string}

When concatenated with a string, this automatically returns the Team's name instead of the Team object.
Source:
Returns:
Type
string
Example
// Logs: Team name: My Team
console.log(`Team name: ${team}`);