DiscordLua
discorddiscord
v1.2.4
Install

MediaGalleryItem

Class
On this page

MediaGalleryItem 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.4 Source

Properties

MediaGalleryItem.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this MediaGalleryItem.

MediaGalleryItem.data

# readonly
Name
data
Type
any
Access
readonly
Description
Instance field MediaGalleryItem.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 MediaGalleryItem.

MediaGalleryItem.description

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

MediaGalleryItem.media

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

MediaGalleryItem.spoiler

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

Methods

MediaGalleryItem:toJSON()

#

Serialize this MediaGalleryItem into a Lua table suitable for REST or debugging.

Signature

MediaGalleryItem:toJSON()

Parameters

No parameters.

Returns

MediaGalleryItem — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a MediaGalleryItem
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 · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc