@runnerty/executor-confirmation
v3.0.2
Published
Executor for Runnerty integrated with Telegram. It sends a message to your Telegram chat and waits for an answer to continue or stop the chain.
Downloads
2
Maintainers
Readme
Confirm executor for Runnerty:
Executor for Runnerty integrated with Telegram. It sends a message to your Telegram chat and waits for an answer to continue or stop the chain.
Installation:
Through NPM
npm i @runnerty/executor-confirmation
You can also add modules to your project with runnerty-cli
npx runnerty-cli add @runnerty/executor-confirmation
This command installs the module in your project, adds example configuration in your config.json
and creates an example plan of use.
If you have installed runnerty-cli globally you can include the module with this command:
rty add @runnerty/executor-confirmation
Configuration sample:
Add in config.json:
{
"id": "confirmation_default",
"type": "@runnerty-executor-confirmation",
"token": "ABC123",
"chatId": "ABC123"
}
Plan sample:
Add in plan.json:
{
"id": "confirmation_default",
"message": "Message",
"confirm_button_message": "ok button message",
"cancel_button_message": "cancel button message",
"confirm_message": "confirmation message",
"cancel_message": "cancel message"
}
If you set a timeout to your proccess, by default, this will end with cancel. There is an optional field to configure that. If "ok" is indicated in this option, the process will end with ok.
{
"action_on_timeout": "ok"
}
There is also an option to include authorized users. Telegram's user name or Id can be indicated in this field. If it is included, only these users are allowed to interactuate.
{
"authorized_users": ["user_name_1", "user_id_2"]
}