GuildSoundboardSoundManager
ManagerOn this page
GuildSoundboardSoundManager is the cache and REST facade for GuildSoundboardSound objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.
Constructor
GuildSoundboardSoundManager.new(client, guild) The class table is callable, so GuildSoundboardSoundManager(client, guild) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
guild |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.GuildSoundboardSoundManager({}, {})Properties
- Name
guild- Type
any- Access
- readonly
- Description
- Guild this GuildSoundboardSoundManager belongs to, when the payload included a guild id.
- Availability
- Populated from the Gateway/REST payload or constructor for this GuildSoundboardSoundManager.
Methods
GuildSoundboardSoundManager:create()
#Create a new resource through REST and cache the result.
Signature
GuildSoundboardSoundManager:create(options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
GuildSoundboardSoundManager — the same instance, for chaining.
Throws
A DiscordLua error when arguments are invalid or the request fails without a callback.
Example
local discord = require("discord")
-- object is a GuildSoundboardSoundManager
object:create({}, function(err, result)
if err then error(err) end
end)GuildSoundboardSoundManager:delete()
#Permanently delete this resource through REST.
Signature
GuildSoundboardSoundManager:delete(id, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
GuildSoundboardSoundManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildSoundboardSoundManager
object:delete("123", function(err, result)
if err then error(err) end
end)GuildSoundboardSoundManager:edit()
#Apply a REST update to this resource.
Signature
GuildSoundboardSoundManager:edit(id, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
GuildSoundboardSoundManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildSoundboardSoundManager
object:edit("123", {}, function(err, result)
if err then error(err) end
end)GuildSoundboardSoundManager:fetch()
#Request a fresh copy of this resource from REST and update the cache.
Signature
GuildSoundboardSoundManager:fetch(id, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
GuildSoundboardSoundManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildSoundboardSoundManager
object:fetch("123", {}, function(err, result)
if err then error(err) end
end)Examples
local discord = require("discord")
local object = discord.GuildSoundboardSoundManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager
Version: discord 1.2.4 · runtime 1.0.0