DiscordLua
discorddiscord
v1.2.4
Install

Team

Class
On this page

Team is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

class Module 1.2.4 Source

Properties

Team.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Team.icon

# readonly
Name
icon
Type
any
Access
readonly
Description
Instance field Team.icon. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Team.id

# readonly
Name
id
Type
any
Access
readonly
Description
Snowflake id of this Team.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Team.members

# readonly
Name
members
Type
Collection
Access
readonly
Description
Instance field Team.members. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this Team.
Related
Collection

Team.name

# readonly
Name
name
Type
any
Access
readonly
Description
Display name of this Team.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Team.ownerId

# readonly
Name
ownerId
Type
any
Access
readonly
Description
Instance field Team.ownerId. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Team.raw

# readonly
Name
raw
Type
any
Access
readonly
Description
Instance field Team.raw. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this Team.

Methods

Team:createdAt()

#

Create dAt through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

Team:createdAt()

Parameters

No parameters.

Returns

Team — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Team
object:createdAt()

Team:createdTimestamp()

#

Create dTimestamp through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

Team:createdTimestamp()

Parameters

No parameters.

Returns

Team — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Team
object:createdTimestamp()

Team:iconURL()

#

Performs icon url on this Team. Call it from bot code when you need that operation on the current object.

Signature

Team:iconURL(options)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

Team — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Team
object:iconURL({})

Team:owner()

#

Performs owner on this Team. Call it from bot code when you need that operation on the current object.

Signature

Team:owner()

Parameters

No parameters.

Returns

Team — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Team
object:owner()

Team:toString()

#

function toString() { [native code] }

Signature

Team:toString()

Parameters

No parameters.

Returns

Team — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Team
object:toString()

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc