Personal Telegram developer console for GitHub

cleanup: remove temporary Telegram diagnostics command

davoodmehraban89 committed Oct 2, 2026 at 19:05 UTC 0644e5e2b27900cedb76fd106e7e28161b66748e
1 file changed -7
src/index.js
-7
@@ -78,13 +78,6 @@ async function handleCommand(env, message) {
78 const chatId = message.chat?.id;
79 const command = (message.text || "").trim().split(/\s+/)[0].split("@")[0].toLowerCase();
80
81 - if (command === "/diag") {
82 - const senderId = message.from?.id;
83 - const authState = isOwner(env, message.from) ? "authorized" : "unauthorized";
84 - await sendMessage(env, chatId, `Telegram ID: <code>${senderId}</code>\nAuthorization: <b>${authState}</b>`);
85 - return;
86 - }
87 -
81 // Personal bot: fail silently for every Telegram user except the owner.
82 if (!isOwner(env, message.from)) return;
83