Skip to content

Configuring Lightning

Configuring Lightning

Lightning is an extensible chat bot which has a few options you can configure when hosting it. This page will let you make a lightning.toml file which you can use to setup the bot.

General Settings

Prefix

The prefix is the character or string that will be used to trigger commands in Lightning. There's no default prefix, so you must set one.

Log Level (optional)

The log level determines how much information Lightning will log. You can set it between panic and trace, with info being the default.

Error logging webhook (optional)

A Discord-compatible webhook URL where Lightning will send error logs.

Database Settings

Lightning supports multiple databases, with Redis and PostgreSQL as options.

Database type

Lightning can use either Redis or PostgreSQL as its database. You can select the database type below.

Database connection

The connection string for the database you selected.

For Redis, this is a hostname (and optionally a port), e.g. localhost:6379.

For PostgreSQL, this is a standard PostgreSQL connection string.

Plugins

Discord

To use Discord with Lightning, you'll first need to create a Discord bot at the Discord Developer Portal and enable the Message Content Intent.

Guilded

To use Guilded with Lightning, you'll first need to create a Guilded bot and get its token.

Revolt

To enable Revolt support for Lightning, you need to enable the plugin and provide a bot token.

Telegram

To enable Telegram support for Lightning, you'll need to talk to @BotFather on Telegram to create a bot and get its token. Additionally, you will need to expose the port provided at the URL for attachments sent from Telegram to work properly.

Generated Config