SimpleContextFetchingStrategy
ClassOn 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.
Constructor
SimpleContextFetchingStrategy.new(manager, options) The class table is callable, so SimpleContextFetchingStrategy(manager, options) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
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. |
local discord = require("discord")
local object = discord.SimpleContextFetchingStrategy({}, {})Properties
- 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.
- 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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
manager |
any |
required | Passed through to the implementation as written. |
Returns
SimpleContextFetchingStrategy — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
shardId |
string |
required | Snowflake id string. |
Returns
SimpleContextFetchingStrategy — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
shardId |
string |
required | Snowflake id string. |
sessionInfo |
any |
required | Passed through to the implementation as written. |
Returns
SimpleContextFetchingStrategy — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
shardId |
string |
required | Snowflake id string. |
signal |
any |
required | Passed through to the implementation as written. |
Returns
SimpleContextFetchingStrategy — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SimpleContextFetchingStrategy
object:waitForIdentify("123", signal)Examples
local discord = require("discord")
local object = discord.SimpleContextFetchingStrategy({})Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase
Version: discord 1.2.9 · runtime 1.0.0