WorkerBootstrapper
ClassOn 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.
Constructor
WorkerBootstrapper.new() The class table is callable, so WorkerBootstrapper() is the same as .new.
No parameters.
local discord = require("discord")
local object = discord.WorkerBootstrapper()Properties
- 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.
- 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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
local discord = require("discord")
-- object is a WorkerBootstrapper
object:bootstrap({})Examples
local discord = require("discord")
local object = discord.WorkerBootstrapper({})Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase
Version: discord 1.2.9 · runtime 1.0.0