DiscordLua
discorddiscord
v1.2.9
Install

WorkerBootstrapper

Class
On this page

WorkerBootstrapper 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

WorkerBootstrapper.new()

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

No parameters.

lua
local discord = require("discord")
local object = discord.WorkerBootstrapper()

Properties

WorkerBootstrapper.data

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

WorkerBootstrapper.shards

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

Methods

WorkerBootstrapper:bootstrap()

#

Performs bootstrap on this WorkerBootstrapper. Call it from bot code when you need that operation on the current object.

Signature

WorkerBootstrapper:bootstrap(options)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

WorkerBootstrapper — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a WorkerBootstrapper
object:bootstrap({})

Examples

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

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

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc