InteractionCollector
collectorOn this page
InteractionCollector is a DiscordLua collector representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Constructor
InteractionCollector.new(client, options) The class table is callable, so InteractionCollector(client, options) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
local discord = require("discord")
local object = discord.InteractionCollector({}, {})Properties
- Name
channelId- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.channelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
componentType- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.componentType. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
customId- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.customId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
filter- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.filter. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
guildId- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.guildId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
interactionType- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.interactionType. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
messageId- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.messageId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
messageInteractionId- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.messageInteractionId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
options- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.options. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
total- Type
any- Access
- readonly
- Description
- Instance field
InteractionCollector.total. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Name
users- Type
- Collection
- Access
- readonly
- Description
- Instance field
InteractionCollector.users. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this InteractionCollector.
- Related
- Collection
Methods
InteractionCollector:empty()
#Performs empty on this InteractionCollector. Call it from bot code when you need that operation on the current object.
Signature
InteractionCollector:empty() Parameters
No parameters.
Returns
InteractionCollector — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a InteractionCollector
object:empty()Examples
local discord = require("discord")
local object = discord.InteractionCollector({})Related APIs
Collector · MessageCollector · ReactionCollector
Version: discord 1.2.4 · runtime 1.0.0