DiscordLua
discorddiscord
v1.2.9
Install

SharedNameAndDescription

Class
On 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.

class Module 1.2.9 Source

Methods

SharedNameAndDescription:setDescription()

#

Set the Description field. Builders return this SharedNameAndDescription so setters can be chained.

Signature

SharedNameAndDescription:setDescription(description)

Parameters

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

Returns

SharedNameAndDescription — the same instance, for chaining.

Example

lua
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

NameTypeRequiredBehavior
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

lua
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

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

Returns

SharedNameAndDescription — the same instance, for chaining.

Example

lua
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

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

Returns

SharedNameAndDescription — the same instance, for chaining.

Example

lua
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

NameTypeRequiredBehavior
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

lua
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

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

Returns

SharedNameAndDescription — the same instance, for chaining.

Example

lua
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

lua
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.

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

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc