Skip to content

SettingsBuilder

A simple class to retain some generic data before a Discord Client can be started, for instance:

  • The Discord bot token/authentication
  • The Discord bot intents

Usage:

local DiscordLuau = require("../Submodules/DiscordLuau")
local IntentsBuilder = DiscordLuau.IntentsBuilder.fromAll()
local SettingsBuilder = DiscordLuau.SettingsBuilder.new("BOT TOKEN", IntentsBuilder)

Properties

The SettingsBuilder instance has no set properties!

Methods

setDiscordToken

SettingsBuilder : setDiscordToken (

     discordToken: string
)  -> Builders.SettingsBuilder

Sets the Discord bot token.

setIntents

SettingsBuilder : setIntents (

     discordIntents: IntentsBuilder
)  -> Builders.SettingsBuilder

Sets the Discord bot intents.

Functions

new

SettingsBuilder . new (

     discordToken: string
     discordIntents: IntentsBuilder?
)  -> ()

Constructs a new instance of SettingsBuilder.