commands with callbackData support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-09-09 23:55:14 +03:00
parent 932da0549a
commit 24b15ca4fe
15 changed files with 353 additions and 176 deletions

View File

@@ -2,27 +2,74 @@
<actions>
<action id="10001" name="start-action" command="/start">Start</action>
<action id="10002" name="help-action" command="/help">Help</action>
<action id="10003" name="to-inline-action" command="/inline">Inline</action>
<action id="10004" name="inline1-action" callbackData="cmd:inline1">Inline button #1</action>
<action id="10005" name="inline2-action" callbackData="cmd:inline2">Inline button #2</action>
<action id="10006" name="url-action" url="https://git.penkrat.ru/ruslan/stbf">Git repo</action>
</actions>
<screens>
<screen id="20001" name="on-start-screen">
<text>This is demo bot</text>
<text>This is demo bot
use Help or /help to view help
</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>
<screen id="20002" name="on-help-screen">
<text>This is demo help
use /inline to switch to inline mode
</text>
<keyboard>
<row>
<button actionRef="help-action">Action.name</button>
</row>
</keyboard>
</screen>
<screen id="20003" name="inline-test-screen">
<text>This is inline buttons:</text>
<keyboard>
<row>
<button actionRef="inline1-action"></button>
<button actionRef="inline2-action"></button>
</row>
<row>
<button actionRef="url-action"></button>
</row>
</keyboard>
</screen>
<screen id="20004" name="inline-test-1-screen">
<text>Inline Screen #1</text>
<keyboard>
<row>
<button actionRef="inline1-action"></button>
<button actionRef="inline2-action"></button>
</row>
<row>
<button actionRef="url-action"></button>
</row>
</keyboard>
</screen>
<screen id="20005" name="inline-test-2-screen">
<text>Inline Screen #2</text>
<keyboard>
<row>
<button actionRef="inline1-action"></button>
<button actionRef="inline2-action"></button>
</row>
<row>
<button actionRef="url-action"></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"/>
<command actionRef="to-inline-action" screenRef="inline-test-screen" id="30003" name="inlineTestCommand"/>
<command actionRef="inline1-action" screenRef="inline-test-1-screen" edit="true" id="30004" name="inlineTest1Command"/>
<command actionRef="inline2-action" screenRef="inline-test-2-screen" edit="true" id="30005" name="inlineTest2Command"/>
</commands>
</flow>