DiscordLua
discorddiscord
v1.2.9
Install

SimpleContextFetchingStrategy

Class
On this page

SimpleContextFetchingStrategy 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

SimpleContextFetchingStrategy.new(manager, options)

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

NameTypeRequiredBehavior
manager 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.
lua
local discord = require("discord")
local object = discord.SimpleContextFetchingStrategy({}, {})

Properties

SimpleContextFetchingStrategy.manager

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

SimpleContextFetchingStrategy.options

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

Methods

SimpleContextFetchingStrategy.ensureThrottler()

# static

Performs ensure throttler on this SimpleContextFetchingStrategy. Call it from bot code when you need that operation on the current object.

Signature

SimpleContextFetchingStrategy.ensureThrottler(manager)

Parameters

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

Returns

SimpleContextFetchingStrategy — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SimpleContextFetchingStrategy
SimpleContextFetchingStrategy.ensureThrottler(manager)

SimpleContextFetchingStrategy:retrieveSessionInfo()

#

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

Signature

SimpleContextFetchingStrategy:retrieveSessionInfo(shardId)

Parameters

NameTypeRequiredBehavior
shardId string required Snowflake id string.

Returns

SimpleContextFetchingStrategy — the same instance, for chaining.

Example

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

SimpleContextFetchingStrategy:updateSessionInfo()

#

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

Signature

SimpleContextFetchingStrategy:updateSessionInfo(shardId, sessionInfo)

Parameters

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

Returns

SimpleContextFetchingStrategy — the same instance, for chaining.

Example

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

SimpleContextFetchingStrategy:waitForIdentify()

#

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

Signature

SimpleContextFetchingStrategy:waitForIdentify(shardId, signal)

Parameters

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

Returns

SimpleContextFetchingStrategy — the same instance, for chaining.

Example

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

Examples

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

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

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc