Guild
ClassOn this page
Guild represents a Discord server the bot can see. Use it to reach channels, members, roles, and guild-scoped REST helpers such as :createChannel.
Properties
- Name
afkChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.afkChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
afkTimeout- Type
any- Access
- readonly
- Description
- Instance field
Guild.afkTimeout. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
applicationId- Type
any- Access
- readonly
- Description
- Instance field
Guild.applicationId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
approximateMemberCount- Type
any- Access
- readonly
- Description
- Instance field
Guild.approximateMemberCount. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
approximatePresenceCount- Type
any- Access
- readonly
- Description
- Instance field
Guild.approximatePresenceCount. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
autoModerationRules- Type
- AutoModerationRuleManager
- Access
- readonly
- Description
- Cache and REST facade for automoderationrule objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- AutoModerationRuleManager
- Name
available- Type
any- Access
- readonly
- Description
- Instance field
Guild.available. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
banner- Type
any- Access
- mutable
- Description
- Instance field
Guild.banner. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
bans- Type
- GuildBanManager
- Access
- readonly
- Description
- Cache and REST facade for guildban objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildBanManager
- Name
channels- Type
- ChannelManager
- Access
- readonly
- Description
- Cache and REST facade for channel objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- ChannelManager
- 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 Guild.
- Name
commands- Type
any- Access
- readonly
- Description
- Instance field
Guild.commands. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
defaultMessageNotifications- Type
any- Access
- mutable
- Description
- Instance field
Guild.defaultMessageNotifications. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
description- Type
any- Access
- readonly
- Description
- Instance field
Guild.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 Guild.
- Name
discoverySplash- Type
any- Access
- mutable
- Description
- Instance field
Guild.discoverySplash. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
emojis- Type
- BaseGuildEmojiManager
- Access
- readonly
- Description
- Cache and REST facade for baseguildemoji objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- BaseGuildEmojiManager
- Name
explicitContentFilter- Type
any- Access
- mutable
- Description
- Instance field
Guild.explicitContentFilter. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
features- Type
any- Access
- readonly
- Description
- Instance field
Guild.features. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
icon- Type
any- Access
- mutable
- Description
- Instance field
Guild.icon. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this Guild.
- Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
incidentsData- Type
any- Access
- readonly
- Description
- Instance field
Guild.incidentsData. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
invites- Type
- GuildInviteManager
- Access
- readonly
- Description
- Cache and REST facade for guildinvite objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildInviteManager
- Name
joinedAt- Type
any- Access
- readonly
- Description
- Instance field
Guild.joinedAt. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
joinedTimestamp- Type
any- Access
- readonly
- Description
- Instance field
Guild.joinedTimestamp. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
large- Type
any- Access
- readonly
- Description
- Instance field
Guild.large. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maxMembers- Type
any- Access
- readonly
- Description
- Instance field
Guild.maxMembers. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maxPresences- Type
any- Access
- readonly
- Description
- Instance field
Guild.maxPresences. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maxStageVideoChannelUsers- Type
any- Access
- readonly
- Description
- Instance field
Guild.maxStageVideoChannelUsers. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maxVideoChannelUsers- Type
any- Access
- readonly
- Description
- Instance field
Guild.maxVideoChannelUsers. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maximumMembers- Type
any- Access
- readonly
- Description
- Instance field
Guild.maximumMembers. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
maximumPresences- Type
any- Access
- readonly
- Description
- Instance field
Guild.maximumPresences. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
memberCount- Type
any- Access
- readonly
- Description
- Instance field
Guild.memberCount. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
members- Type
- GuildMemberManager
- Access
- readonly
- Description
- Cache and REST facade for guildmember objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildMemberManager
- Name
mfaLevel- Type
any- Access
- readonly
- Description
- Instance field
Guild.mfaLevel. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
name- Type
any- Access
- mutable
- Description
- Display name of this Guild.
- Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
nsfwLevel- Type
any- Access
- readonly
- Description
- Instance field
Guild.nsfwLevel. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
owner- Type
any- Access
- mutable
- Description
- Instance field
Guild.owner. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
ownerId- Type
any- Access
- readonly
- Description
- Instance field
Guild.ownerId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
permissions- Type
any- Access
- readonly
- Description
- Instance field
Guild.permissions. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
preferredLocale- Type
any- Access
- mutable
- Description
- Instance field
Guild.preferredLocale. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
presences- Type
- PresenceManager
- Access
- readonly
- Description
- Cache and REST facade for presence objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- PresenceManager
- Name
publicUpdatesChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.publicUpdatesChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
raw- Type
any- Access
- readonly
- Description
- Instance field
Guild.raw. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
roles- Type
- RoleManager
- Access
- readonly
- Description
- Cache and REST facade for role objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- RoleManager
- Name
rulesChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.rulesChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
safetyAlertsChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.safetyAlertsChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
scheduledEvents- Type
- GuildScheduledEventManager
- Access
- readonly
- Description
- Cache and REST facade for guildscheduledevent objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildScheduledEventManager
- Name
soundboardSounds- Type
- GuildSoundboardSoundManager
- Access
- readonly
- Description
- Cache and REST facade for guildsoundboardsound objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildSoundboardSoundManager
- Name
splash- Type
any- Access
- mutable
- Description
- Instance field
Guild.splash. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
stageInstances- Type
- StageInstanceManager
- Access
- readonly
- Description
- Cache and REST facade for stageinstance objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- StageInstanceManager
- Name
stickers- Type
- GuildStickerManager
- Access
- readonly
- Description
- Cache and REST facade for guildsticker objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- GuildStickerManager
- Name
systemChannelFlags- Type
any- Access
- mutable
- Description
- Instance field
Guild.systemChannelFlags. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
systemChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.systemChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
vanityURLCode- Type
any- Access
- readonly
- Description
- Instance field
Guild.vanityURLCode. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
vanityURLUses- Type
any- Access
- readonly
- Description
- Instance field
Guild.vanityURLUses. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
verificationLevel- Type
any- Access
- mutable
- Description
- Instance field
Guild.verificationLevel. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
voiceStates- Type
- VoiceStateManager
- Access
- readonly
- Description
- Cache and REST facade for voicestate objects owned by this Guild. Use it to fetch, create, resolve, and mutate those resources.
- Availability
- Created in
Guild.newand remains valid for the lifetime of the Guild. - Related
- VoiceStateManager
- Name
welcomeScreen- Type
any- Access
- readonly
- Description
- Instance field
Guild.welcomeScreen. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
widgetChannelId- Type
any- Access
- readonly
- Description
- Instance field
Guild.widgetChannelId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
- Name
widgetEnabled- Type
any- Access
- readonly
- Description
- Instance field
Guild.widgetEnabled. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Guild.
Methods
Guild:afkChannel()
#Performs afk channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:afkChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:afkChannel()Guild:ban()
#Performs ban on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:ban(userId, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:ban("123", {}, function(err, result)
if err then error(err) end
end)Guild:bannerURL()
#Performs banner url on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:bannerURL(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:bannerURL({})Guild:bulkBan()
#Performs bulk ban on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:bulkBan(userIds, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userIds |
any |
required | Passed through to the implementation as written. |
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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:bulkBan(userIds, {}, function(err, result)
if err then error(err) end
end)Guild:createAutoModerationRule()
#Create AutoModerationRule through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createAutoModerationRule(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createAutoModerationRule({}, function(err, result)
if err then error(err) end
end)Guild:createChannel()
#Create Channel through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createChannel(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createChannel({}, function(err, result)
if err then error(err) end
end)Guild:createdAt()
#Create dAt through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createdAt() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createdAt()Guild:createdTimestamp()
#Create dTimestamp through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createdTimestamp() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createdTimestamp()Guild:createEmoji()
#Create Emoji through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createEmoji(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createEmoji({}, function(err, result)
if err then error(err) end
end)Guild:createInvite()
#Create Invite through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createInvite(channelId, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createInvite("123", {}, function(err, result)
if err then error(err) end
end)Guild:createScheduledEvent()
#Create ScheduledEvent through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createScheduledEvent(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createScheduledEvent({}, function(err, result)
if err then error(err) end
end)Guild:createSoundboardSound()
#Create SoundboardSound through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createSoundboardSound(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createSoundboardSound({}, function(err, result)
if err then error(err) end
end)Guild:createSticker()
#Create Sticker through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createSticker(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createSticker({}, function(err, result)
if err then error(err) end
end)Guild:createTemplate()
#Create Template through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Guild:createTemplate(name, description) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
name |
any |
required | Passed through to the implementation as written. |
description |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:createTemplate(name, description)Guild:delete()
#Permanently delete this resource through REST.
Signature
Guild:delete(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:delete(function(err, result)
if err then error(err) end
end)Guild:disableInvites()
#Performs disable invites on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:disableInvites(disabled) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
disabled |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:disableInvites(disabled)Guild:discoverySplashURL()
#Performs discovery splash url on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:discoverySplashURL(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:discoverySplashURL({})Guild:edit()
#Apply a REST update to this resource.
Signature
Guild:edit(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:edit({})Guild:editOnboarding()
#Apply a REST update to Onboarding and refresh the local object when the request succeeds.
Signature
Guild:editOnboarding(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:editOnboarding({})Guild:editWelcomeScreen()
#Apply a REST update to WelcomeScreen and refresh the local object when the request succeeds.
Signature
Guild:editWelcomeScreen(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:editWelcomeScreen({})Guild:equals()
#Return whether this Guild refers to the same resource as the argument.
Signature
Guild:equals(other) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
other |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Guild
object:equals(other)Guild:fetch()
#Request a fresh copy of this resource from REST and update the cache.
Signature
Guild:fetch(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetch(function(err, result)
if err then error(err) end
end)Guild:fetchAuditLogs()
#Fetch AuditLogs from REST and update the local cache when the request succeeds.
Signature
Guild:fetchAuditLogs(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchAuditLogs({}, function(err, result)
if err then error(err) end
end)Guild:fetchAutoModerationRules()
#Fetch AutoModerationRules from REST and update the local cache when the request succeeds.
Signature
Guild:fetchAutoModerationRules(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchAutoModerationRules(function(err, result)
if err then error(err) end
end)Guild:fetchBan()
#Fetch Ban from REST and update the local cache when the request succeeds.
Signature
Guild:fetchBan(userId, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchBan("123", function(err, result)
if err then error(err) end
end)Guild:fetchBans()
#Fetch Bans from REST and update the local cache when the request succeeds.
Signature
Guild:fetchBans(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchBans(function(err, result)
if err then error(err) end
end)Guild:fetchChannels()
#Fetch Channels from REST and update the local cache when the request succeeds.
Signature
Guild:fetchChannels(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchChannels(function(err, result)
if err then error(err) end
end)Guild:fetchEmojis()
#Fetch Emojis from REST and update the local cache when the request succeeds.
Signature
Guild:fetchEmojis(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchEmojis(function(err, result)
if err then error(err) end
end)Guild:fetchIntegrations()
#Fetch Integrations from REST and update the local cache when the request succeeds.
Signature
Guild:fetchIntegrations(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchIntegrations(function(err, result)
if err then error(err) end
end)Guild:fetchInvites()
#Fetch Invites from REST and update the local cache when the request succeeds.
Signature
Guild:fetchInvites(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchInvites(function(err, result)
if err then error(err) end
end)Guild:fetchMe()
#Fetch Me from REST and update the local cache when the request succeeds.
Signature
Guild:fetchMe(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchMe(function(err, result)
if err then error(err) end
end)Guild:fetchMember()
#Fetch Member from REST and update the local cache when the request succeeds.
Signature
Guild:fetchMember(userId, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchMember("123", function(err, result)
if err then error(err) end
end)Guild:fetchMembers()
#Fetch Members from REST and update the local cache when the request succeeds.
Signature
Guild:fetchMembers(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
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchMembers({}, function(err, result)
if err then error(err) end
end)Guild:fetchOnboarding()
#Fetch Onboarding from REST and update the local cache when the request succeeds.
Signature
Guild:fetchOnboarding(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchOnboarding(function(err, result)
if err then error(err) end
end)Guild:fetchOwner()
#Fetch Owner from REST and update the local cache when the request succeeds.
Signature
Guild:fetchOwner(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchOwner(function(err, result)
if err then error(err) end
end)Guild:fetchPreview()
#Fetch Preview from REST and update the local cache when the request succeeds.
Signature
Guild:fetchPreview(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchPreview(function(err, result)
if err then error(err) end
end)Guild:fetchScheduledEvents()
#Fetch ScheduledEvents from REST and update the local cache when the request succeeds.
Signature
Guild:fetchScheduledEvents(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchScheduledEvents(function(err, result)
if err then error(err) end
end)Guild:fetchSoundboardSounds()
#Fetch SoundboardSounds from REST and update the local cache when the request succeeds.
Signature
Guild:fetchSoundboardSounds(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchSoundboardSounds(function(err, result)
if err then error(err) end
end)Guild:fetchStickers()
#Fetch Stickers from REST and update the local cache when the request succeeds.
Signature
Guild:fetchStickers(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchStickers(function(err, result)
if err then error(err) end
end)Guild:fetchTemplates()
#Fetch Templates from REST and update the local cache when the request succeeds.
Signature
Guild:fetchTemplates(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchTemplates(function(err, result)
if err then error(err) end
end)Guild:fetchVanityData()
#Fetch VanityData from REST and update the local cache when the request succeeds.
Signature
Guild:fetchVanityData(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchVanityData(function(err, result)
if err then error(err) end
end)Guild:fetchWebhooks()
#Fetch Webhooks from REST and update the local cache when the request succeeds.
Signature
Guild:fetchWebhooks(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchWebhooks(function(err, result)
if err then error(err) end
end)Guild:fetchWelcomeScreen()
#Fetch WelcomeScreen from REST and update the local cache when the request succeeds.
Signature
Guild:fetchWelcomeScreen(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchWelcomeScreen(function(err, result)
if err then error(err) end
end)Guild:fetchWidget()
#Fetch Widget from REST and update the local cache when the request succeeds.
Signature
Guild:fetchWidget(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchWidget(function(err, result)
if err then error(err) end
end)Guild:fetchWidgetSettings()
#Fetch WidgetSettings from REST and update the local cache when the request succeeds.
Signature
Guild:fetchWidgetSettings(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:fetchWidgetSettings(function(err, result)
if err then error(err) end
end)Guild:iconURL()
#Performs icon url on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:iconURL(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:iconURL({})Guild:kick()
#Performs kick on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:kick(userId, reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:kick("123", reason, function(err, result)
if err then error(err) end
end)Guild:leave()
#Leave the associated voice connection.
Signature
Guild:leave() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:leave()Guild:maximumBitrate()
#Performs maximum bitrate on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:maximumBitrate() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Guild
object:maximumBitrate()Guild:maximumStageBitrate()
#Performs maximum stage bitrate on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:maximumStageBitrate() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Guild
object:maximumStageBitrate()Guild:me()
#Performs me on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:me() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:me()Guild:nameAcronym()
#Performs name acronym on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:nameAcronym() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:nameAcronym()Guild:partnered()
#Performs partnered on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:partnered() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:partnered()Guild:publicUpdatesChannel()
#Performs public updates channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:publicUpdatesChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:publicUpdatesChannel()Guild:removeTimeout()
#Remove Timeout from this Guild.
Signature
Guild:removeTimeout(userId, reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:removeTimeout("123", reason, function(err, result)
if err then error(err) end
end)Guild:rulesChannel()
#Performs rules channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:rulesChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:rulesChannel()Guild:safetyAlertsChannel()
#Performs safety alerts channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:safetyAlertsChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:safetyAlertsChannel()Guild:setAFKChannel()
#Set the AFKChannel field. Builders return this Guild so setters can be chained.
Signature
Guild:setAFKChannel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setAFKChannel("123")Guild:setAFKTimeout()
#Set the AFKTimeout field. Builders return this Guild so setters can be chained.
Signature
Guild:setAFKTimeout(timeout) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
timeout |
number |
required | Duration in milliseconds. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setAFKTimeout(timeout)Guild:setBanner()
#Set the Banner field. Builders return this Guild so setters can be chained.
Signature
Guild:setBanner(banner) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
banner |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setBanner(banner)Guild:setDefaultMessageNotifications()
#Set the DefaultMessageNotifications field. Builders return this Guild so setters can be chained.
Signature
Guild:setDefaultMessageNotifications(value) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
value |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setDefaultMessageNotifications(value)Guild:setDiscoverySplash()
#Set the DiscoverySplash field. Builders return this Guild so setters can be chained.
Signature
Guild:setDiscoverySplash(splash) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
splash |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setDiscoverySplash(splash)Guild:setExplicitContentFilter()
#Set the ExplicitContentFilter field. Builders return this Guild so setters can be chained.
Signature
Guild:setExplicitContentFilter(value) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
value |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setExplicitContentFilter(value)Guild:setIcon()
#Set the Icon field. Builders return this Guild so setters can be chained.
Signature
Guild:setIcon(icon) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
icon |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setIcon(icon)Guild:setIncidentActions()
#Set the IncidentActions field. Builders return this Guild so setters can be chained.
Signature
Guild:setIncidentActions(actions) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
actions |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setIncidentActions(actions)Guild:setMFALevel()
#Set the MFALevel field. Builders return this Guild so setters can be chained.
Signature
Guild:setMFALevel(level) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
level |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setMFALevel(level)Guild:setName()
#Set the Name field. Builders return this Guild so setters can be chained.
Signature
Guild:setName(name) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
name |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setName(name)Guild:setNickname()
#Set the Nickname field. Builders return this Guild so setters can be chained.
Signature
Guild:setNickname(userId, nick, reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
nick |
any |
required | Passed through to the implementation as written. |
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setNickname("123", nick, reason, function(err, result)
if err then error(err) end
end)Guild:setOwner()
#Set the Owner field. Builders return this Guild so setters can be chained.
Signature
Guild:setOwner(userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setOwner("123")Guild:setPreferredLocale()
#Set the PreferredLocale field. Builders return this Guild so setters can be chained.
Signature
Guild:setPreferredLocale(locale) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
locale |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setPreferredLocale(locale)Guild:setPremiumProgressBarEnabled()
#Set the PremiumProgressBarEnabled field. Builders return this Guild so setters can be chained.
Signature
Guild:setPremiumProgressBarEnabled(enabled) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
enabled |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setPremiumProgressBarEnabled(enabled)Guild:setPublicUpdatesChannel()
#Set the PublicUpdatesChannel field. Builders return this Guild so setters can be chained.
Signature
Guild:setPublicUpdatesChannel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setPublicUpdatesChannel("123")Guild:setRulesChannel()
#Set the RulesChannel field. Builders return this Guild so setters can be chained.
Signature
Guild:setRulesChannel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setRulesChannel("123")Guild:setSafetyAlertsChannel()
#Set the SafetyAlertsChannel field. Builders return this Guild so setters can be chained.
Signature
Guild:setSafetyAlertsChannel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setSafetyAlertsChannel("123")Guild:setSplash()
#Set the Splash field. Builders return this Guild so setters can be chained.
Signature
Guild:setSplash(splash) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
splash |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setSplash(splash)Guild:setSystemChannel()
#Set the SystemChannel field. Builders return this Guild so setters can be chained.
Signature
Guild:setSystemChannel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setSystemChannel("123")Guild:setSystemChannelFlags()
#Set the SystemChannelFlags field. Builders return this Guild so setters can be chained.
Signature
Guild:setSystemChannelFlags(flags) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
flags |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setSystemChannelFlags(flags)Guild:setVerificationLevel()
#Set the VerificationLevel field. Builders return this Guild so setters can be chained.
Signature
Guild:setVerificationLevel(level) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
level |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setVerificationLevel(level)Guild:setWidgetSettings()
#Set the WidgetSettings field. Builders return this Guild so setters can be chained.
Signature
Guild:setWidgetSettings(settings) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
settings |
any |
required | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:setWidgetSettings(settings)Guild:shard()
#Performs shard on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:shard() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:shard()Guild:shardId()
#Performs shard id on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:shardId() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:shardId()Guild:splashURL()
#Performs splash url on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:splashURL(options) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:splashURL({})Guild:systemChannel()
#Performs system channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:systemChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:systemChannel()Guild:timeout()
#Performs timeout on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:timeout(userId, duration, reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
duration |
any |
required | Passed through to the implementation as written. |
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:timeout("123", duration, reason, function(err, result)
if err then error(err) end
end)Guild:toJSON()
#Serialize this Guild into a Lua table suitable for REST or debugging.
Signature
Guild:toJSON() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Guild
object:toJSON()Guild:toString()
#function toString() { [native code] }
Signature
Guild:toString() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:toString()Guild:unban()
#Performs unban on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:unban(userId, reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:unban("123", reason, function(err, result)
if err then error(err) end
end)Guild:verified()
#Performs verified on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:verified() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:verified()Guild:voiceAdapterCreator()
#Performs voice adapter creator on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:voiceAdapterCreator() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Guild
object:voiceAdapterCreator()Guild:widgetChannel()
#Performs widget channel on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:widgetChannel() Parameters
No parameters.
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:widgetChannel()Guild:widgetImageURL()
#Performs widget image url on this Guild. Call it from bot code when you need that operation on the current object.
Signature
Guild:widgetImageURL(style) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
style |
any |
optional | Passed through to the implementation as written. |
Returns
Guild — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Guild
object:widgetImageURL(style)Static members
-
Guild.AnonymousGuild -
Guild.BaseGuild -
Guild.InviteGuild -
Guild.OAuth2Guild
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 · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0