BotBhai
BotBhaiDeveloper Docs
Troubleshooting

Debugging Guide

Start with the platform action result, then Terminal Logs, then Telegram webhook state. Avoid random code changes before identifying which layer failed.

01

Fast diagnosis table

Common symptoms and the first useful fix.

ProblemLikely causeFirst fix
Start shows token errorInvalid or revoked BotFather tokenRegenerate token and update the bot record
Start says bot.php missingWrong filename or file not savedCreate exactly bot.php in the bot workspace
Webhook failedHTTPS/DNS/network problem or Telegram API rate limitCheck action error text, SSL and retry timing
Bot starts but no replyPHP logic/runtime errorOpen Terminal Logs and test a minimal /start handler
Old code still runsRuntime not refreshedSave the file and press Restart
Bot is bannedAdmin runtime lockOnly admin can Unban; user controls remain blocked
Python/Laravel does not startUnsupported built-in runtimeDeploy to compatible external hosting and set webhook there
02

Minimal isolation test

Replace complex code temporarily with the smallest PHP webhook handler.

bot.php diagnostic
<?php
$update = json_decode(file_get_contents('php://input') ?: '[]', true);
file_put_contents(__DIR__.'/debug.log', date('c').' '.json_encode($update).PHP_EOL, FILE_APPEND);
http_response_code(200);
echo 'OK';
Remove temporary debug files

Do not keep verbose update logs in production. They may contain usernames, chat IDs and message content.