DiscordLua
discorddiscord
v1.2.4
Install

Activity

Class
On this page

Activity 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

Activity.applicationId

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

Activity.assets

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

Activity.buttons

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

Activity.createdTimestamp

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

Activity.details

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

Activity.emoji

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

Activity.flags

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

Activity.name

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

Activity.party

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

Activity.presence

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

Activity.raw

# readonly
Name
raw
Type
any
Access
readonly
Description
Instance field Activity.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 Activity.

Activity.state

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

Activity.syncId

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

Activity.timestamps

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

Activity.type

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

Activity.url

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

Methods

Activity:createdAt()

#

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

Signature

Activity:createdAt()

Parameters

No parameters.

Returns

Activity — the same instance, for chaining.

Example

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

Activity:equals()

#

Return whether this Activity refers to the same resource as the argument.

Signature

Activity:equals(other)

Parameters

NameTypeRequiredBehavior
other any required Passed through to the implementation as written.

Returns

Activity — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Activity
object:equals(other)

Activity:toString()

#

function toString() { [native code] }

Signature

Activity:toString()

Parameters

No parameters.

Returns

Activity — the same instance, for chaining.

Example

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

Examples

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

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

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc