SharedNameAndDescription
ClassOn this page
SharedNameAndDescription is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Methods
SharedNameAndDescription:setDescription()
#Set the Description field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setDescription(description) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
description |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setDescription(description)SharedNameAndDescription:setDescriptionLocalization()
#Set the DescriptionLocalization field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setDescriptionLocalization(locale, description) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
locale |
any |
required | Passed through to the implementation as written. |
description |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setDescriptionLocalization(locale, description)SharedNameAndDescription:setDescriptionLocalizations()
#Set the DescriptionLocalizations field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setDescriptionLocalizations(localizations) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
localizations |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setDescriptionLocalizations(localizations)SharedNameAndDescription:setName()
#Set the Name field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setName(name) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
name |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setName(name)SharedNameAndDescription:setNameLocalization()
#Set the NameLocalization field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setNameLocalization(locale, name) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
locale |
any |
required | Passed through to the implementation as written. |
name |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setNameLocalization(locale, name)SharedNameAndDescription:setNameLocalizations()
#Set the NameLocalizations field. Builders return this SharedNameAndDescription so setters can be chained.
Signature
SharedNameAndDescription:setNameLocalizations(localizations) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
localizations |
any |
required | Passed through to the implementation as written. |
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:setNameLocalizations(localizations)SharedNameAndDescription:toJSON()
#Serialize this SharedNameAndDescription into a Lua table suitable for REST or debugging.
Signature
SharedNameAndDescription:toJSON() Parameters
No parameters.
Returns
SharedNameAndDescription — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedNameAndDescription
object:toJSON()Examples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase
Version: discord 1.2.9 · runtime 1.0.0