DiscordLua
discorddiscord
v1.2.4
Install

PresenceManager

Manager
On this page

PresenceManager is the cache and REST facade for Presence objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.

manager Module 1.2.4 Source

Constructor

PresenceManager.new(client, guild)

The class table is callable, so PresenceManager(client, guild) is the same as .new.

NameTypeRequiredBehavior
client any required Passed through to the implementation as written.
guild any required Passed through to the implementation as written.
lua
local discord = require("discord")
local object = discord.PresenceManager({}, {})

Properties

PresenceManager.guild

# readonly
Name
guild
Type
any
Access
readonly
Description
Guild this PresenceManager belongs to, when the payload included a guild id.
Availability
Populated from the Gateway/REST payload or constructor for this PresenceManager.

Methods

PresenceManager:resolveId()

#

Resolve a snowflake, object, or mention to an id string.

Signature

PresenceManager:resolveId(userOrPresence)

Parameters

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a PresenceManager
object:resolveId(userOrPresence)

Examples

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

ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc