LogoAntiRaid

@discord-types/builders/guild/guild

API reference for @discord-types/builders/guild/guild

@discord-types/builders/guild/guild

Types

Guild

Raw Type
type Guild = Guild.Prototype, & {
	name: string?,

	verificationLevel: guildTypes.VerificationLevel,

	defaultMessageNotifications: guildTypes.DefaultMessageNotification,

	explicitContentFilter: guildTypes.ExplicitContentFilterLevel,

	afkChannelId: apiTypes.Snowflake?,

	afkTimeout: number?,

	icon: string?,

	ownerId: apiTypes.Snowflake?,

	splash: string?,

	discoverySplash: string?,

	banner: string?,

	systemChannelId: apiTypes.Snowflake?,

	systemChannelFlags: number?,

	rulesChannelId: apiTypes.Snowflake?,

	publicUpdatesChannelId: apiTypes.Snowflake?,

	preferredLocale: apiTypes.LanguageLocales?,

	features: {apiTypes.GuildFeature},

	description: string?,

	premiumProgressBarEnabled: boolean?,

	safetyAlertsChannelId: apiTypes.Snowflake?
}

Intersection with variants:

Variant 2
PropTypeDescription
name?
-
verificationLevel
-
defaultMessageNotifications
-
explicitContentFilter
-
afkChannelId?
-
afkTimeout?
-
icon?
-
ownerId?
-
splash?
-
discoverySplash?
-
banner?
-
systemChannelId?
-
systemChannelFlags?
-
rulesChannelId?
-
publicUpdatesChannelId?
-
preferredLocale?
-
features
-
description?
-
premiumProgressBarEnabled?
-
safetyAlertsChannelId?
-

JSON

Raw Type
type JSON = Guild.Prototype.build(nil :: any),

Functions

Guild.Prototype.setName

[[ set the name for this guild ]]

Function Signature
--[[
	set the name for this guild
]]
function Guild.Prototype.setName(self: Guild, name: string) -> Guild end

Arguments

name

string

Returns

ret1

Guild

Guild.Prototype.setVerificationLevel

[[ set the explicit verification level for this guild ]]

Function Signature
--[[
	set the explicit verification level for this guild
]]
function Guild.Prototype.setVerificationLevel(self: Guild, verificationLevel: guildTypes.VerificationLevel) -> Guild end

Arguments

verificationLevel

guildTypes.VerificationLevel

Returns

ret1

Guild

Guild.Prototype.setDefaultMessageNotifications

[[ set the explicit default message notifications for this guild ]]

Function Signature
--[[
	set the explicit default message notifications for this guild
]]
function Guild.Prototype.setDefaultMessageNotifications(self: Guild, defaultMessageNotifications: guildTypes.DefaultMessageNotification) -> Guild end

Arguments

defaultMessageNotifications

guildTypes.DefaultMessageNotification

Returns

ret1

Guild

Guild.Prototype.setExplicitContentFilter

[[ set the explicit content filter level for this guild ]]

Function Signature
--[[
	set the explicit content filter level for this guild
]]
function Guild.Prototype.setExplicitContentFilter(self: Guild, explicitContentFilter: guildTypes.ExplicitContentFilterLevel) -> Guild end

Arguments

explicitContentFilter

guildTypes.ExplicitContentFilterLevel

Returns

ret1

Guild

Guild.Prototype.setAfkChannelId

[[ set the id for afk channel ]]

Function Signature
--[[
	set the id for afk channel
]]
function Guild.Prototype.setAfkChannelId(self: Guild, afkChannelId: apiTypes.Snowflake) -> Guild end

Arguments

afkChannelId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.setAfkTimeout

[[ afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 ]]

Function Signature
--[[
	afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600
]]
function Guild.Prototype.setAfkTimeout(self: Guild, afkTimeout: number) -> Guild end

Arguments

afkTimeout

number

Returns

ret1

Guild

Guild.Prototype.setIcon

[[ base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature) ]]

Function Signature
--[[
	base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has
	the ANIMATED_ICON feature)
]]
function Guild.Prototype.setIcon(self: Guild, source: string) -> Guild end

Arguments

source

string

Returns

ret1

Guild

Guild.Prototype.setOwnerId

[[ user id to transfer guild ownership to (must be owner) ]]

Function Signature
--[[
	user id to transfer guild ownership to (must be owner)
]]
function Guild.Prototype.setOwnerId(self: Guild, ownerId: apiTypes.Snowflake) -> Guild end

Arguments

ownerId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.setSplash

[[ base64 16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature) ]]

Function Signature
--[[
	base64 16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature)
]]
function Guild.Prototype.setSplash(self: Guild, source: string) -> Guild end

Arguments

source

string

Returns

ret1

Guild

Guild.Prototype.setDiscoverySplash

[[ base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature) ]]

Function Signature
--[[
	base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature)
]]
function Guild.Prototype.setDiscoverySplash(self: Guild, source: string) -> Guild end

Arguments

source

string

Returns

ret1

Guild

Guild.Prototype.setBanner

[[ base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated gif when the server has the ANIMATED_BANNER feature) ]]

Function Signature
--[[
	base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated
	gif when the server has the ANIMATED_BANNER feature)
]]
function Guild.Prototype.setBanner(self: Guild, source: string) -> Guild end

Arguments

source

string

Returns

ret1

Guild

Guild.Prototype.setSystemChannelId

[[ the id of the channel where guild notices such as welcome messages and boost events are posted ]]

Function Signature
--[[
	the id of the channel where guild notices such as welcome messages and boost events are posted
]]
function Guild.Prototype.setSystemChannelId(self: Guild, systemChannelId: apiTypes.Snowflake) -> Guild end

Arguments

systemChannelId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.setSystemChannelFlags

[[ set the system channel flags ]]

Function Signature
--[[
	set the system channel flags
]]
function Guild.Prototype.setSystemChannelFlags(self: Guild, systemChannelFlags: number) -> Guild end

Arguments

systemChannelFlags

number

Returns

ret1

Guild

Guild.Prototype.setRulesChannelId

[[ the id of the channel where Community guilds display rules and/or guidelines ]]

Function Signature
--[[
	the id of the channel where Community guilds display rules and/or guidelines
]]
function Guild.Prototype.setRulesChannelId(self: Guild, rulesChannelId: apiTypes.Snowflake) -> Guild end

Arguments

rulesChannelId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.setPublicUpdatesChannelId

[[ the id of the channel where admins and moderators of Community guilds receive notices from Discord ]]

Function Signature
--[[
	the id of the channel where admins and moderators of Community guilds receive notices from Discord
]]
function Guild.Prototype.setPublicUpdatesChannelId(self: Guild, publicUpdatesChannelId: apiTypes.Snowflake) -> Guild end

Arguments

publicUpdatesChannelId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.setPreferredLocale

[[ the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" ]]

Function Signature
--[[
	the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
]]
function Guild.Prototype.setPreferredLocale(self: Guild, preferredLocale: apiTypes.LanguageLocales) -> Guild end

Arguments

preferredLocale

apiTypes.LanguageLocales

Returns

ret1

Guild

Guild.Prototype.addFeature

[[ enable a specific guild feature for this guild ]]

Function Signature
--[[
	enable a specific guild feature for this guild
]]
function Guild.Prototype.addFeature(self: Guild, feature: apiTypes.GuildFeature) -> Guild end

Arguments

feature

apiTypes.GuildFeature

Returns

ret1

Guild

Guild.Prototype.setDescription

[[ the description for the guild ]]

Function Signature
--[[
	the description for the guild
]]
function Guild.Prototype.setDescription(self: Guild, description: string) -> Guild end

Arguments

description

string

Returns

ret1

Guild

Guild.Prototype.setPremiumProgressBarEnabled

[[ whether the guild's boost progress bar should be enabled ]]

Function Signature
--[[
	whether the guild's boost progress bar should be enabled
]]
function Guild.Prototype.setPremiumProgressBarEnabled(self: Guild, premiumProgressBarEnabled: boolean) -> Guild end

Arguments

premiumProgressBarEnabled

boolean

Returns

ret1

Guild

Guild.Prototype.setSafetyAlertsChannelId

[[ the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord ]]

Function Signature
--[[
	the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
]]
function Guild.Prototype.setSafetyAlertsChannelId(self: Guild, safetyAlertsChannelId: apiTypes.Snowflake) -> Guild end

Arguments

safetyAlertsChannelId

apiTypes.Snowflake

Returns

ret1

Guild

Guild.Prototype.build

[[ Responsible for building the Guild JSON that can be parsed by the Discord API. ]]

Function Signature
--[[
	Responsible for building the Guild JSON that can be parsed by the Discord API.
]]
function Guild.Prototype.build(self: Guild) -> JSON end

Returns

ret1

JSON

Guild.Interface.new

[[ Responsible for creating a new Guild.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new Guild.

	\`\`\`lua
	
	\`\`\`
]]
function Guild.Interface.new(resource: {
		name: string?,

		verificationLevel: guildTypes.VerificationLevel?,

		defaultMessageNotifications: guildTypes.DefaultMessageNotification?,

		explicitContentFilter: guildTypes.ExplicitContentFilterLevel?,

		afkChannelId: apiTypes.Snowflake?,

		afkTimeout: number?,

		icon: string?,

		ownerId: apiTypes.Snowflake?,

		splash: string?,

		discoverySplash: string?,

		banner: string?,

		systemChannelId: apiTypes.Snowflake?,

		systemChannelFlags: number?,

		rulesChannelId: apiTypes.Snowflake?,

		publicUpdatesChannelId: apiTypes.Snowflake?,

		preferredLocale: apiTypes.LanguageLocales?,

		features: {apiTypes.GuildFeature}?,

		description: string?,

		premiumProgressBarEnabled: boolean?,

		safetyAlertsChannelId: apiTypes.Snowflake?
	}?) -> Guild end

Arguments

resource

This field is optional and may not be specified

{name: string?, verificationLevel: guildTypes.VerificationLevel?, defaultMessageNotifications: guildTypes.DefaultMessageNotification?, explicitContentFilter: guildTypes.ExplicitContentFilterLevel?, afkChannelId: apiTypes.Snowflake?, afkTimeout: number?, icon: string?, ownerId: apiTypes.Snowflake?, splash: string?, discoverySplash: string?, banner: string?, systemChannelId: apiTypes.Snowflake?, systemChannelFlags: number?, rulesChannelId: apiTypes.Snowflake?, publicUpdatesChannelId: apiTypes.Snowflake?, preferredLocale: apiTypes.LanguageLocales?, features: {apiTypes.GuildFeature}?, description: string?, premiumProgressBarEnabled: boolean?, safetyAlertsChannelId: apiTypes.Snowflake?}?

Returns

ret1

Guild

Last updated on