Scaffolding, Validation & Webhook Testing APIs

Raw MD
Automate bot generation, syntax verification, local webhook simulation, and atomic deployment.

1. Get Bot Scaffolds (scaffold_bot)

Action: scaffold_bot
Parameters: type (styled_keyboard, database_bot, shop_bot), bot_name (optional)
Returns fully formed, linted PHP code ready for production.

2. Validate PHP Syntax (validate_code)

Action: validate_code
Parameters: code
Verifies that PHP code contains zero syntax errors without writing to disk.

3. Test Webhook Simulator (test_webhook)

Action: test_webhook
Parameters: bot_id, update (optional custom Telegram update payload)
Simulates execution locally, capturing output, runtime duration, and fatal errors from error.log.

4. Build, Validate & Deploy in One Step (build_and_deploy_bot)

Action: build_and_deploy_bot or deploy_bot
Parameters: bot_id, code (or type)
Atomically performs syntax linting, writes to index.php, and runs a test simulation.