Plugins-oriented bot
Go to file
2024-12-07 10:10:17 +06:00
.fleet start 3.2.0 2022-12-05 15:31:19 +06:00
.github/workflows update dependencies 2023-11-05 20:52:30 +06:00
badges update readme 2020-11-12 13:45:23 +06:00
bot add support of subcontext initial actions 2024-12-03 11:28:07 +06:00
gradle update dependencies 2024-12-07 10:10:17 +06:00
plugin replace database extension into externded file 2024-09-22 19:39:45 +06:00
_config.yml Set theme jekyll-theme-cayman 2020-11-12 13:34:22 +06:00
.gitattributes Initial commit 2020-11-08 19:04:44 +06:00
.gitignore update dependencies and add logging 2022-06-11 19:15:09 +06:00
build.gradle update dependencies and fill changelog 2023-12-10 14:46:13 +06:00
changelog_parser.sh add github workaround 2020-11-12 12:03:33 +06:00
CHANGELOG.md update dependencies 2024-12-07 10:10:17 +06:00
github_release.gradle update dependencies 2024-04-23 18:44:26 +06:00
gradle.properties start 10.3.0 2024-12-07 10:09:23 +06:00
gradlew Initial commit 2020-11-08 19:04:44 +06:00
gradlew.bat Initial commit 2020-11-08 19:04:44 +06:00
LICENSE Initial commit 2020-11-08 19:04:44 +06:00
README.md add support of subcontext initial actions 2024-12-03 11:28:07 +06:00
settings.gradle remove redundant modules 2022-08-13 20:09:21 +06:00
template.config.json improve reconnect feature 2022-09-04 15:07:30 +06:00

PlaguBot

For users

Template: Use template

You can create your bot using this template by following of its instructions

For developers

Template: Use template
Bot version: Maven Central
Plugin version: Maven Central

That is a set of libraries for plagubots. Look at the PlaguBot Plugin template to find how to create your bot.

Technical help

FSM

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
    }
}

Subcontext initial actions

Bot will take all the CombinedSubcontextInitialAction.SubItems from Koin to include it in root of behaviourBuilder. To create your own subitem:

singleWithRandomQualifier<CombinedSubcontextInitialAction.SubItem> {
    CombinedSubcontextInitialAction.SubItem {
        // do some action or throw error to rerun on next round
    }
}