mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-10-31 21:13:46 +00:00
Plugins-oriented bot
.fleet | ||
.github/workflows | ||
badges | ||
bot | ||
gradle | ||
plugin | ||
_config.yml | ||
.gitattributes | ||
.gitignore | ||
build.gradle | ||
changelog_parser.sh | ||
CHANGELOG.md | ||
github_release.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
README.md | ||
settings.gradle | ||
template.config.json |
PlaguBot
For users
You can create your bot using this template by following of its instructions
For developers
Template: | |
---|---|
Bot version: | |
Plugin version: |
That is a set of libraries for plagubots. Look at the PlaguBot Plugin template to find how to create your bot.
Technical help
In this bot has been used variant with FSM. That means that you may use all the Behaviour Builder with FSM functionality. In case you wish to setup states repo, you should use the next code in the setupDI
of your plugin:
single<StatesManager<State>> {
// setup your manager and return here
// Default is:
DefaultStatesManager(
InMemoryDefaultStatesManagerRepo()
)
}
Besides, you may setup handling errors lambda in the same function:
single<StateHandlingErrorHandler<State>> {
{ state, e ->
logger.eS(e) { "Unable to handle state $state" } // logging by default
null // you should return new state or null, default callback will return null
}
}