Guild
Implementation of Discord’s Guild object as a Luau builder.
See Discord’s documentation for more information about the allow and deny fields:
https://discord.com/developers/docs/resources/guild
Summary
Properties
Guild.name :: string?Guild.verificationLevel :: Classes.VerificationLevelGuild.defaultMessageNotifications :: Classes.DefaultMessageNotificationGuild.explicitContentFilter :: Classes.ExplicitContentFilterLevelGuild.afkChannelId :: string?Guild.afkTimeout :: number?Guild.icon :: string?Guild.ownerId :: string?Guild.splash :: string?Guild.discoverySplash :: string?Guild.banner :: string?Guild.systemChannelId :: string?Guild.systemChannelFlags :: number?Guild.rulesChannelId :: string?Guild.publicUpdatesChannelId :: string?Guild.preferredLocale :: Classes.LanguageLocales?Guild.features :: { Builders.GuildFeature }Guild.description :: string?Guild.premiumProgressBarEnabled :: boolean?Guild.safetyAlertsChannelId :: string?Methods
Guild:setName(name: string) → GuildGuild:setVerificationLevel(verificationLevel: apiTypes.VerificationLevel) → GuildGuild:setDefaultMessageNotifications(defaultMessageNotifications: apiTypes.DefaultMessageNotification) → GuildGuild:setExplicitContentFilter(explicitContentFilter: apiTypes.ExplicitContentFilterLevel) → GuildGuild:setAfkChannelId(afkChannelId: apiTypes.Snowflake) → GuildGuild:setAfkTimeout(afkTimeout: number) → GuildGuild:setIcon(source: string) → GuildGuild:setOwnerId(ownerId: apiTypes.Snowflake) → GuildGuild:setSplash(source: string) → GuildGuild:setDiscoverySplash(source: string) → GuildGuild:setBanner(source: string) → GuildGuild:setSystemChannelId(systemChannelId: apiTypes.Snowflake) → GuildGuild:setSystemChannelFlags(systemChannelFlags: number) → GuildGuild:setRulesChannelId(rulesChannelId: apiTypes.Snowflake) → GuildGuild:setPublicUpdatesChannelId(publicUpdatesChannelId: apiTypes.Snowflake) → GuildGuild:setPreferredLocale(preferredLocale: apiTypes.LanguageLocales) → GuildGuild:addFeature(feature: apiTypes.GuildFeature) → GuildGuild:setDescription(description: string) → GuildGuild:setPremiumProgressBarEnabled(premiumProgressBarEnabled: boolean) → GuildGuild:setSafetyAlertsChannelId(safetyAlertsChannelId: apiTypes.Snowflake) → GuildGuild:build() → JSONProperties
Section titled “Properties”The name of the guild.
verificationLevel
Section titled “verificationLevel”Verification level setting for the guild.
defaultMessageNotifications
Section titled “defaultMessageNotifications”Default message notification level.
explicitContentFilter
Section titled “explicitContentFilter”Explicit content filter level setting.
afkChannelId
Section titled “afkChannelId”ID of the AFK voice channel.
afkTimeout
Section titled “afkTimeout”AFK timeout duration in seconds.
Base64 encoded icon for the guild.
ownerId
Section titled “ownerId”User ID of the owner of the guild.
splash
Section titled “splash”Base64 splash image for the guild.
discoverySplash
Section titled “discoverySplash”Base64 discovery splash image for the guild.
banner
Section titled “banner”Base64 banner image for the guild.
systemChannelId
Section titled “systemChannelId”ID of the system messages channel.
systemChannelFlags
Section titled “systemChannelFlags”Flags for the system channel.
rulesChannelId
Section titled “rulesChannelId”ID of the rules channel.
publicUpdatesChannelId
Section titled “publicUpdatesChannelId”ID of the public updates channel.
preferredLocale
Section titled “preferredLocale”Preferred language/locale for the guild.
features
Section titled “features”List of enabled guild features.
description
Section titled “description”Description of the guild.
premiumProgressBarEnabled
Section titled “premiumProgressBarEnabled”Whether boost progress bar is enabled.
safetyAlertsChannelId
Section titled “safetyAlertsChannelId”ID of the safety alerts channel.
Methods
Section titled “Methods”setName
Section titled “setName”Guild : setName ( name ) -> Guild
Set the name for this guild.
Parameters
| name: string |
Returns
| Guild |
setVerificationLevel
Section titled “setVerificationLevel”Guild : setVerificationLevel ( verificationLevel ) -> Guild
Set the explicit verification level for this guild.
Parameters
| verificationLevel: VerificationLevel |
Returns
| Guild |
setDefaultMessageNotifications
Section titled “setDefaultMessageNotifications”Guild : setDefaultMessageNotifications ( defaultMessageNotifications ) -> Guild
Set the explicit default message notifications for this guild.
Parameters
| defaultMessageNotifications: DefaultMessageNotification |
Returns
| Guild |
setExplicitContentFilter
Section titled “setExplicitContentFilter”Guild : setExplicitContentFilter ( explicitContentFilter ) -> Guild
Set the explicit content filter level for this guild.
Parameters
| explicitContentFilter: ExplicitContentFilterLevel |
Returns
| Guild |
setAfkChannelId
Section titled “setAfkChannelId”Guild : setAfkChannelId ( afkChannelId ) -> Guild
Set the id for the AFK channel.
Parameters
| afkChannelId: Snowflake |
Returns
| Guild |
setAfkTimeout
Section titled “setAfkTimeout”Guild : setAfkTimeout ( afkTimeout ) -> Guild
Set the AFK timeout in seconds. Can be one of: 60, 300, 900, 1800, 3600.
Parameters
| afkTimeout: number |
Returns
| Guild |
setIcon
Section titled “setIcon”Guild : setIcon ( source ) -> Guild
Set the base64 1024x1024 PNG/JPEG/GIF image for the guild icon.
Parameters
| source: string |
Returns
| Guild |
setOwnerId
Section titled “setOwnerId”Guild : setOwnerId ( ownerId ) -> Guild
Set the user ID to transfer guild ownership to (must be owner).
Parameters
| ownerId: Snowflake |
Returns
| Guild |
setSplash
Section titled “setSplash”Guild : setSplash ( source ) -> Guild
Set the base64 16:9 PNG/JPEG image for the guild splash.
Parameters
| source: string |
Returns
| Guild |
setDiscoverySplash
Section titled “setDiscoverySplash”Guild : setDiscoverySplash ( source ) -> Guild
Set the base64 16:9 PNG/JPEG image for the discovery splash of the guild.
Parameters
| source: string |
Returns
| Guild |
setBanner
Section titled “setBanner”Guild : setBanner ( source ) -> Guild
Set the base64 16:9 PNG/JPEG/GIF image for the guild banner.
Parameters
| source: string |
Returns
| Guild |
setSystemChannelId
Section titled “setSystemChannelId”Guild : setSystemChannelId ( systemChannelId ) -> Guild
Set the ID of the system channel.
Parameters
| systemChannelId: Snowflake |
Returns
| Guild |
setSystemChannelFlags
Section titled “setSystemChannelFlags”Guild : setSystemChannelFlags ( systemChannelFlags ) -> Guild
Set the system channel flags.
Parameters
| systemChannelFlags: number |
Returns
| Guild |
setRulesChannelId
Section titled “setRulesChannelId”Guild : setRulesChannelId ( rulesChannelId ) -> Guild
Set the ID of the rules channel.
Parameters
| rulesChannelId: Snowflake |
Returns
| Guild |
setPublicUpdatesChannelId
Section titled “setPublicUpdatesChannelId”Guild : setPublicUpdatesChannelId ( publicUpdatesChannelId ) -> Guild
Set the ID of the public updates channel.
Parameters
| publicUpdatesChannelId: Snowflake |
Returns
| Guild |
setPreferredLocale
Section titled “setPreferredLocale”Guild : setPreferredLocale ( preferredLocale ) -> Guild
Set the preferred locale of the guild.
Parameters
| preferredLocale: LanguageLocales |
Returns
| Guild |
addFeature
Section titled “addFeature”Guild : addFeature ( feature ) -> Guild
Enable a specific guild feature.
Parameters
| feature: GuildFeature |
Returns
| Guild |
setDescription
Section titled “setDescription”Guild : setDescription ( description ) -> Guild
Set the description for the guild.
Parameters
| description: string |
Returns
| Guild |
setPremiumProgressBarEnabled
Section titled “setPremiumProgressBarEnabled”Guild : setPremiumProgressBarEnabled ( premiumProgressBarEnabled ) -> Guild
Set whether the guild’s boost progress bar should be enabled.
Parameters
| premiumProgressBarEnabled: boolean |
Returns
| Guild |
setSafetyAlertsChannelId
Section titled “setSafetyAlertsChannelId”Guild : setSafetyAlertsChannelId ( safetyAlertsChannelId ) -> Guild
Set the ID of the safety alerts channel.
Parameters
| safetyAlertsChannelId: Snowflake |
Returns
| Guild |
Guild : build ( ) -> JSON
Responsible for building the Guild JSON that can be parsed by the Discord API.
Returns
| JSON |
Functions
Section titled “Functions”Guild . new ( resource ) -> Guild
Construct a new Guild object.
Parameters
| resource: { name: string?, verificationLevel: apiTypes.VerificationLevel?, defaultMessageNotifications: apiTypes.DefaultMessageNotification?, explicitContentFilter: apiTypes.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, } |
Returns
| Guild |