DiscordLua
discorddiscord
v1.2.9
Install

WorkerContextFetchingStrategy

Class
On this page

WorkerContextFetchingStrategy 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.9 Source

Constructor

WorkerContextFetchingStrategy.new(options)

The class table is callable, so WorkerContextFetchingStrategy(options) is the same as .new.

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.
lua
local discord = require("discord")
local object = discord.WorkerContextFetchingStrategy({})

Properties

WorkerContextFetchingStrategy.options

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

Methods

WorkerContextFetchingStrategy:retrieveSessionInfo()

#

Performs retrieve session info on this WorkerContextFetchingStrategy. Call it from bot code when you need that operation on the current object.

Signature

WorkerContextFetchingStrategy:retrieveSessionInfo(shardId)

Parameters

NameTypeRequiredBehavior
shardId string required Snowflake id string.

Returns

WorkerContextFetchingStrategy — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a WorkerContextFetchingStrategy
object:retrieveSessionInfo("123")

WorkerContextFetchingStrategy:updateSessionInfo()

#

Performs update session info on this WorkerContextFetchingStrategy. Call it from bot code when you need that operation on the current object.

Signature

WorkerContextFetchingStrategy:updateSessionInfo(shardId, sessionInfo)

Parameters

NameTypeRequiredBehavior
shardId string required Snowflake id string.
sessionInfo any required Passed through to the implementation as written.

Returns

WorkerContextFetchingStrategy — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a WorkerContextFetchingStrategy
object:updateSessionInfo("123", sessionInfo)

WorkerContextFetchingStrategy:waitForIdentify()

#

Performs wait for identify on this WorkerContextFetchingStrategy. Call it from bot code when you need that operation on the current object.

Signature

WorkerContextFetchingStrategy:waitForIdentify(shardId, signal)

Parameters

NameTypeRequiredBehavior
shardId string required Snowflake id string.
signal any required Passed through to the implementation as written.

Returns

WorkerContextFetchingStrategy — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a WorkerContextFetchingStrategy
object:waitForIdentify("123", signal)

Examples

lua
local discord = require("discord")
local object = discord.WorkerContextFetchingStrategy({})

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc