Skip to content

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

Properties

The Guild instance has no set properties!

Methods

The Guild instance has no set methods!

Functions

setName

Guild . setName (

     self: Guild
     name: string
)  -> ()

Set the name for this guild.

setVerificationLevel

Guild . setVerificationLevel (

     self: Guild
     verificationLevel: apiTypes.VerificationLevel
)  -> ()

Set the explicit verification level for this guild.

setDefaultMessageNotifications

Guild . setDefaultMessageNotifications (

     self: Guild
     defaultMessageNotifications: apiTypes.DefaultMessageNotification
)  -> ()

Set the explicit default message notifications for this guild.

setExplicitContentFilter

Guild . setExplicitContentFilter (

     self: Guild
     explicitContentFilter: apiTypes.ExplicitContentFilterLevel
)  -> ()

Set the explicit content filter level for this guild.

setAfkChannelId

Guild . setAfkChannelId (

     self: Guild
     afkChannelId: apiTypes.Snowflake
)  -> ()

Set the id for the AFK channel.

setAfkTimeout

Guild . setAfkTimeout (

     self: Guild
     afkTimeout: number
)  -> ()

Set the AFK timeout in seconds. Can be one of: 60, 300, 900, 1800, 3600.

setIcon

Guild . setIcon (

     self: Guild
     source: string
)  -> ()

Set the base64 1024x1024 PNG/JPEG/GIF image for the guild icon.

setOwnerId

Guild . setOwnerId (

     self: Guild
     ownerId: apiTypes.Snowflake
)  -> ()

Set the user ID to transfer guild ownership to (must be owner).

setSplash

Guild . setSplash (

     self: Guild
     source: string
)  -> ()

Set the base64 16:9 PNG/JPEG image for the guild splash.

setDiscoverySplash

Guild . setDiscoverySplash (

     self: Guild
     source: string
)  -> ()

Set the base64 16:9 PNG/JPEG image for the discovery splash of the guild.

setBanner

Guild . setBanner (

     self: Guild
     source: string
)  -> ()

Set the base64 16:9 PNG/JPEG/GIF image for the guild banner.

setSystemChannelId

Guild . setSystemChannelId (

     self: Guild
     systemChannelId: apiTypes.Snowflake
)  -> ()

Set the ID of the system channel.

setSystemChannelFlags

Guild . setSystemChannelFlags (

     self: Guild
     systemChannelFlags: number
)  -> ()

Set the system channel flags.

setRulesChannelId

Guild . setRulesChannelId (

     self: Guild
     rulesChannelId: apiTypes.Snowflake
)  -> ()

Set the ID of the rules channel.

setPublicUpdatesChannelId

Guild . setPublicUpdatesChannelId (

     self: Guild
     publicUpdatesChannelId: apiTypes.Snowflake
)  -> ()

Set the ID of the public updates channel.

setPreferredLocale

Guild . setPreferredLocale (

     self: Guild
     preferredLocale: apiTypes.LanguageLocales
)  -> ()

Set the preferred locale of the guild.

addFeature

Guild . addFeature (

     self: Guild
     feature: apiTypes.GuildFeature
)  -> ()

Enable a specific guild feature.

setDescription

Guild . setDescription (

     self: Guild
     description: string
)  -> ()

Set the description for the guild.

setPremiumProgressBarEnabled

Guild . setPremiumProgressBarEnabled (

     self: Guild
     premiumProgressBarEnabled: boolean
)  -> ()

Set whether the guild’s boost progress bar should be enabled.

setSafetyAlertsChannelId

Guild . setSafetyAlertsChannelId (

     self: Guild
     safetyAlertsChannelId: apiTypes.Snowflake
)  -> ()

Set the ID of the safety alerts channel.

build

Guild . build (

     self: Guild
)  -> ()

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

new

Guild . new (

     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,
    }
)  -> ()

Construct a new Guild object.