Repository structure
You can make export for any free bot in the Store. Just install it.
It is good for practice.

bot.json file

Please see this

Commands - in commands folder

File name - it is command name (But it can be rewritten in command description)
For commands with "/" (for example command "/start") file name is "_start"
Command can have: name, help, aliases (second names), answer, keyboard, scnarios (for simple logic) and other options.
If the command has a folder - it is located in a folder on the disk with the same name

Command description

It is optional file header:
1
/*CMD
2
command: /test
3
help: this is help for ccommand
4
need_reply: [ true or false here ]
5
auto_retry_time: [ time in sec ]
6
folder: MyFolder
7
answer: it is example answer for /test command
8
keyboard: button1, button2
9
aliases: /test2, /test3
10
CMD*/
Copied!
Command description - it is optional block.
multiline also supported. For example for answer:
1
/*CMD
2
<<ANSWER
3
test answer
4
with several
5
lines
6
ANSWER
7
CMD*/
Copied!
You can have only answer (or others) key in the command description. All keys - optional
See more

Command body

It is command code in JavaScript. Use Bot Java Script for logic in command.
For example:
Bot.sendMessage(2+2);
See more

Libraries - in libs folder

You can store common code in the libs folder
See more