Step by step guide¶
This walks through one small function from an empty folder to a working button. It takes a few minutes and needs nothing but your config file.
1. Point the config at a folder¶
The path is relative to the config file. See
Configuration → function_directory rules.
2. Write the function file¶
Create functions/greet.yaml. The parameter is called args so a button can
fill it:
Your first function
3. Add a button that uses it¶
A button for the new function
4. Validate and list the functions¶
Check the config, then see what loaded
You should see a greet line. Each line shows the name, where the function came
from, and how many parameters it has. See
CLI → list-functions.
If validate complains, the message names the button and the value that is
missing — check Rules.
5. Run the bot and tap the button¶
Start the bot in the foreground
Send /start in Telegram, tap Say hello, and the bot runs echo Hello world
and sends Hello world back as a code block.
6. Make it reusable¶
Change the button's args value, or add a second button with a different one.
The function stays the same:
Two buttons, one function
Related¶
- Placeholders — add optional parts to the command
- Rules — what the loader accepts
- File structure — every field explained
- Menu — where to put the button in your menu