feat(telegram): localized /start welcome with channel & chat follow links #117
Reference in New Issue
Block a user
Delete Branch "feature/bot-welcome-localized"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Localizes the main bot's /start reply (ru/en by the sender's Telegram language, carried on the message itself), with the longer welcome copy + a localized launch button (Открыть «Эрудит» / Open “Erudite”). Links the game channel and discussion chat by their public @username, resolved once at startup via getChat from the existing TELEGRAM_GAME_CHANNEL_ID / TELEGRAM_CHAT_ID; a missing handle degrades to a generic noun, not a dangling @.
Verified getChat works on the contour bot (channel @erudit, chat @erudite_chat). Review on the contour: open the bot, send /start, check ru/en rendering + tappable @-links + button.
The main bot answered /start with a single English line ("Tap to open Scrabble."). Localize it: Russian or English by the sender's reported Telegram language (Message.from.language_code, which the Bot API carries on the message itself — there is no separate user-update event — English fallback), with the longer welcome copy and a localized launch button ("Открыть «Эрудит»" / "Open “Erudite”"). The welcome links the game channel and the discussion chat by their public @username, resolved once at startup from the configured TELEGRAM_GAME_CHANNEL_ID / TELEGRAM_CHAT_ID via getChat and cached. A handle that is unset, private, or unreadable degrades to a generic noun ("the channel" / "our chat") rather than a dangling "@", so the paragraph always reads cleanly (the bot's info screen still lists the real links). Adds GameChannelID to bot.Config (wired from the existing config) for the channel handle. Tests: startText localization + handle embedding + per-slot generic fallback; handleStart language selection; resolveWelcomeHandles. README updated.