lightning

module
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT

README

lightning: truly powerful cross-platform bots

lightning logo

  • the bridge - connect Discord, Stoat, Matrix, Spacebar, and Telegram
  • the framework - build your own cross-platform bots

somewhat important note

please note this readme, alongside the website, are somewhat outdated and likely wrong. please feel free to reach out at any of the support links on the website, as those are working and we'd be more than happy to help out

the project

Lightning is a project developing truly powerful cross-platform bots, with the underlying Lightning framework being used for Lightning bridge, which is what runs Bolt, the hosted bridge bot. The goal is to also make the framework itself usable by other developers, to create their own bots, and to make the bridge easy to self-host, while also supporting the principles of:

  • Connecting communities: the Lightning bridge connects Discord, Stoat, Matrix, Spacebar, and Telegram, allowing communities to connect, wherever they are
  • Extensibility: the Lightning framework uses plugins to make it easy to add new features, while keeping the core simple. The bridge is also designed to be flexible, with options to disable pings, setup subscribe-only channels, and more.
  • Ease of use: the Lightning framework is designed to be easy to use, with a simple API, and the bridge is designed to be easy to set up and use, with easy-to-understand documentation.
  • Strength: Lightning is built on Go, making it easy to build, run, and configure, all while being performant and reliable.
the bridge bot

If you've ever had a community, chances are you talk to them in many places, whether that's Discord, Stoat, Matrix, Spacebar, or Telegram. Over time, you end up with fragmentation as your community grows and changes, with many people using multiple messaging apps. People eventually grow tired of the differences between apps, and switching between them, with things becoming a mess.

You could try to move everyone to one app, but that might alienate people, so what do you do, what options do you have?

Bridging! Everyone can use their favorite app, gets the same messages, and is on the same page. Lightning is an easy to use bridge bot that supports Discord, Stoat, Matrix, Spacebar, and Telegram. To get started, check out the getting started guide, which will walk you through using Bolt, the hosted version of the Lightning bot. If you want to self-host, read the self-hosting guide to get started.

the framework

Lightning is a framework for building cross-platform bots, allowing you to make bots that support multiple platforms without having to worry about platform-specific code. The framework is built in Go, making it easy to work with, and is designed to handle things like commands, events, rate-limits, attachments, and more, all while being battle-tested in Bolt, which has handled over half-a-million messages during just the summer of 2025.

The framework consists of the core library, which is platform-agnostic, and plugins, which add support for specific platforms, such as Discord, Stoat, Matrix, Spacebar, and Telegram. The only platform-specific code is in the plugins, making it possible to support new platforms without modifying your bot's core logic.

To see a simple example of how to use the framework, check out the framework guide, which will walk you through creating a simple bot that responds to messages and commands. For the full documentation, check out the framework documentation.

what's the difference between Bolt and Lightning?

Lightning is both the open-source framework and bridge bot that are used to run Bolt, the hosted version of the bridge bot. Bolt is a specific instance of the Lightning bridge bot, which is hosted by William Horning and is free to use. You can also self-host your own instance of the Lightning bridge

licensing

Lightning, the framework and bridge bot, is licensed under the MIT license. The framework and plugins will always remain under the MIT license, though the bridge bot may have a different license in the future, but will always be free to use. Bolt is also free to use, but is also subject to the terms of service.

Directories

Path Synopsis
cmd
lightning command
Package main is the entrypoint for Lightning, the bridge bot thing.
Package main is the entrypoint for Lightning, the bridge bot thing.
Package internal implements various functionality (such as caching, emoji character mapping, and ID handling) relied upon by other packages in the Lightning suite.
Package internal implements various functionality (such as caching, emoji character mapping, and ID handling) relied upon by other packages in the Lightning suite.
pkg
lightning
Package lightning provides a cross-platform extensible bot framework, allowing you to make bots that support multiple platforms while abstracting platform-specific code with plugins.
Package lightning provides a cross-platform extensible bot framework, allowing you to make bots that support multiple platforms while abstracting platform-specific code with plugins.
platforms/api
Package api provides a lightning.Plugin implementation with a REST API which implements its own protocol in addition to support for Matterbridge.
Package api provides a lightning.Plugin implementation with a REST API which implements its own protocol in addition to support for Matterbridge.
platforms/discord
Package discord provides a lightning.Plugin implementation for Discord.
Package discord provides a lightning.Plugin implementation for Discord.
platforms/irc
Package irc provides a lightning.Plugin implementation for IRC.
Package irc provides a lightning.Plugin implementation for IRC.
platforms/matrix
Package matrix provides a lightning.Plugin implementation for Matrix.
Package matrix provides a lightning.Plugin implementation for Matrix.
platforms/matrix/internal
Package mautrix implements the Matrix Client-Server API.
Package mautrix implements the Matrix Client-Server API.
platforms/osmium
Package osmium provides a lightning.Plugin implementation for Osmium (Tangle).
Package osmium provides a lightning.Plugin implementation for Osmium (Tangle).
platforms/stoat
Package stoat provides a lightning.Plugin implementation for Stoat.
Package stoat provides a lightning.Plugin implementation for Stoat.
platforms/telegram
Package telegram provides a lightning.Plugin implementation for Telegram.
Package telegram provides a lightning.Plugin implementation for Telegram.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL