TwurpleAuthenticationGetting dataExamplesFAQMigration

BotConfig

The bot configuration.

{
The preferred authentication method for authorized actions such as moderation.
authMethod?:
BotAuthMethod

Aliased type: "bot" | "broadcaster"

The {@link AuthProvider} instance to use for authenticating the bot and its users.
The channel to join.
channel?: string
The channels to join.
channels?: ResolvableValue<string[]>
Additional options to pass to the constructor of the underlying {@link ChatClient}.
chatClientOptions?: Omit<ChatClientOptions, "authProvider" | "channels">
The commands to register.
Whether to enable debug logs.
debug?: boolean
Whether to receive `onMessage` events for message that were already handled as a command.
The prefix for all commands.
prefix?: string
}

Properties

authMethod

Type:
BotAuthMethod

Aliased type: "bot" | "broadcaster"

The preferred authentication method for authorized actions such as moderation.

Defaults to bot authentication.

Some methods can only use broadcaster authentication - they will be marked as such.

authProvider

Type: AuthProvider

The AuthProvider instance to use for authenticating the bot and its users.

channel

Type: ?string

The channel to join.

Takes priority over channels.

channels

Type: ?ResolvableValue<string[]>

The channels to join.

Is ignored when channel is set.

chatClientOptions

Type: ?Omit<ChatClientOptions, "authProvider" | "channels">

Additional options to pass to the constructor of the underlying ChatClient.

commands

Type: ?BotCommand[]

The commands to register.

debug

Type: ?boolean

Whether to enable debug logs.

emitCommandMessageEvents

Type: ?boolean

Whether to receive onMessage events for message that were already handled as a command.

prefix

Type: ?string

The prefix for all commands.

Defaults to !.