π€ LowBot is a Go project on GitHub that simplifies bot creation by automatically generating bot journeys from a YAML script. It offers extensive customization options, making it highly versatile and adaptable.
-
LowBot follows a straightforward and intuitive YAML script format, making it easy to understand and modify for creating bot journeys.
-
LowBot offers extensive flexibility, allowing users to define their own custom actions and implement unique business rules tailored to their specific requirements.
-
With LowBot, users can seamlessly integrate and implement their own channels, empowering them to connect the bot with various platforms and communication channels of their choice.
go get github.com/chrissgon/lowbot
Start a bot with Telegram and local persist
import "github.com/chrissgon/lowbot"
flow, _ := lowbot.NewFlow("your_flow.yaml")
channel, _ := lowbot.NewTelegram("your_telegram_token")
persist, _ := lowbot.NewLocalPersist()
lowbot.StartBot(flow, channel, persist)
Start a bot with Discord and custom actions
import "github.com/chrissgon/lowbot"
myActions := lowbot.ActionsMap{
"Custom": func(flow *lowbot.Flow, channel lowbot.IChannel) (bool, error) {
// your rules
wait := true
return wait, nil
},
}
lowbot.SetCustomActions(myActions)
flow, _ := lowbot.NewFlow("your_flow.yaml")
channel, _ := lowbot.NewDiscord()
persist, _ := lowbot.NewLocalPersist()
lowbot.StartBot(flow, channel, persist)
You can create your Channel or Persist by implementing their interfaces
import "github.com/chrissgon/lowbot"
func MyNewChannel () lowbot.IChannel {
// implements Channel
}
func MyNewPersist () lowbot.Persist {
// implements Persist
}
flow, _ := lowbot.NewFlow("your_flow.yaml")
// And you can pass in the StartBot
lowbot.StartBot(flow, MyNewChannel(), MyNewPersist())
Read all documentation in docs folder.
When you run this project, you can adjusts the following environment variables.
Debug
: Show debug => default: true
EnableLocalPersist
: Enable local persist => default: true
When you run this project, you need set the following environment variables.
-
TELEGRAM_TOKEN
: Telegram bot token. -
DISCORD_TOKEN
: Discord bot token.
Run all the tests with coverage.
go test ./... -coverprofile=coverage.out && ./coverage-ignore.sh && go tool cover -html=coverage.out
This project is open source and welcomes community contributions. Feel free to fork, implement improvements, and submit a pull request. Every contribution is valued and appreciated!
We hope that lowbot proves useful to you and enhances your manga reading experience. Feel free to explore the source code, provide feedback, and report any issues you encounter.