Skip to content

WidgetSettings

Implementation of discords WidgetSettings object as a Luau builder.

https://discord.com/developers/docs/resources/guild#guild-widget-settings-object

Properties

The WidgetSettings instance has no set properties!

Methods

The WidgetSettings instance has no set methods!

Functions

setEnabled

WidgetSettings . setEnabled (

     self: WidgetSettings
     enabled: boolean
)  -> ()

Set whether the widget is enabled

setChannelId

WidgetSettings . setChannelId (

     self: WidgetSettings
     channelId: string
)  -> ()

Set the widget channel id

build

WidgetSettings . build (

     self: WidgetSettings
)  -> ()

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

new

WidgetSettings . new (

     resource: {
       enabled: boolean?,
       channelId: string?,
    }
)  -> ()

Responsible for creating a new WidgetSettings.

local settings = WidgetSettings.new({
enabled = true,
channelId = "123456789"
})