Activity
ClassOn 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.
Properties
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Name
name- Type
any- Access
- readonly
- Description
- Display name of this Activity.
- Availability
- Populated from the Gateway/REST payload or constructor for this Activity.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
other |
any |
required | Passed through to the implementation as written. |
Returns
Activity — the same instance, for chaining.
Example
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
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.
Related APIs
ActionRow · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment · AuthorizingIntegrationOwners
Version: discord 1.2.4 · runtime 1.0.0