From b4af085133aa9c8d0011627096075ca462f4628c Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Thu, 30 Jul 2026 02:25:55 -0700 Subject: [PATCH] fix(bot): stop the main slot handing out a dead link, add PEX to the live menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MINI_APP_URLS.main still pointed at telegram.pezkuwichain.io, the testnet domain whose DNS record was removed on 2026-07-12. Live webhooks arrive as ?bot=krd and ?bot=dks so that default is never reached today, but a webhook call without the parameter would have answered /start with a link that cannot resolve. Also puts the PEX.network link on the krd menu — @pezkuwichainBot, the bot that actually opens the mini app. It only existed on the dks welcome, so no user reaching the mini app through the main bot has ever been shown it. Leaves the three-slot routing alone: both slots are live and healthy on the cloud project, and collapsing them would have removed the AI assistant. --- supabase/functions/telegram-bot/index.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/supabase/functions/telegram-bot/index.ts b/supabase/functions/telegram-bot/index.ts index 1586e33..f82b9e6 100644 --- a/supabase/functions/telegram-bot/index.ts +++ b/supabase/functions/telegram-bot/index.ts @@ -1,7 +1,7 @@ /** * PezkuwiChain Telegram Bot - Supabase Edge Function * Handles webhook updates from three separate bots: - * - @Pezkuwichain_Bot (main) → telegram.pezkuwichain.io + * - @Pezkuwichain_Bot (main) → retired testnet bot; slot kept as a fallback * - @pezkuwichainBot (krd) → telegram.pezkiwi.app * - @DKSKurdistanBot (dks) → AI assistant powered by Claude */ @@ -20,7 +20,10 @@ const BOT_TOKENS: Record = { }; const MINI_APP_URLS: Record = { - main: 'https://telegram.pezkuwichain.io', + // The testnet domain this used to point at was removed on 2026-07-12 and no + // longer resolves. Live webhooks arrive as ?bot=krd and ?bot=dks so this + // default is never hit today, but it should not hand out a dead link if it is. + main: 'https://telegram.pezkiwi.app', krd: 'https://telegram.pezkiwi.app', dks: 'https://telegram.pezkiwi.app', }; @@ -530,6 +533,13 @@ async function sendKrdWelcome(token: string, chatId: number) { web_app: { url: `${appUrl}/citizens` }, }, ], + // Row 5: Exchange + [ + { + text: '💱 Buy/Sell Crypto — PEX.network', + url: 'https://pex.network', + }, + ], ], };