WidgetSettings
Implementation of discords WidgetSettings object as a Luau builder.
https://discord.com/developers/docs/resources/guild#guild-widget-settings-object
Summary
Properties
Section titled “Properties”enabled
Section titled “enabled”Whether the widget is enabled for the guild.
channelId
Section titled “channelId”The channel id that the widget will generate an invite to.
Methods
Section titled “Methods”setEnabled
Section titled “setEnabled”WidgetSettings : setEnabled ( enabled ) -> WidgetSettings
Set whether the widget is enabled
Parameters
| enabled: boolean |
Returns
| WidgetSettings |
setChannelId
Section titled “setChannelId”WidgetSettings : setChannelId ( channelId ) -> WidgetSettings
Set the widget channel id
Parameters
| channelId: string |
Returns
| WidgetSettings |
WidgetSettings : build ( ) -> JSON
Responsible for building the WidgetSettingsObject JSON that can be parsed by the Discord API.
Returns
| JSON |
Functions
Section titled “Functions”WidgetSettings . new ( resource ) -> WidgetSettings
Responsible for creating a new WidgetSettings.
local settings = WidgetSettings.new({ enabled = true, channelId = "123456789"})