Files
stbf/stbf-demo/README.MD
Ruslan Penkrat 932da0549a
All checks were successful
continuous-integration/drone/push Build is passing
add readme
2021-09-05 13:03:47 +03:00

56 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Демо приложение
Позволяет запустить простого бота, который будет отвечать на заранее определенные команды,
без программирования логики.
### Запуск
Собрать fat-jar
```shell
mvn package
```
Запустить
```shell
java -jar stbf-demo.jar -t <bot:token> -f <полный путь к конфигу>
```
### Файл конфигурации
Если запустить без указания файла конфигурации бота, то будет использована следующая:
```xml
<flow>
<actions>
<action id="10001" name="start-action" command="/start">Start</action>
<action id="10002" name="help-action" command="/help">Help</action>
</actions>
<screens>
<screen id="20001" name="on-start-screen">
<text>This is demo bot</text>
<keyboard>
<row>
<button actionRef="help-action">Action.name</button>
</row>
</keyboard>
</screen>
<screen id="20001" name="on-help-screen">
<text>This is demo help</text>
<keyboard>
<row>
<button actionRef="help-action">Action.name</button>
</row>
</keyboard>
</screen>
</screens>
<commands>
<command actionRef="start-action" screenRef="on-start-screen" id="30001" name="startCommand"/>
<command actionRef="help-action" screenRef="on-help-screen" id="30002" name="helpCommand"/>
</commands>
</flow>
```
Ее можно использовать как базу для разработки своей.