Documentation
¶
Overview ¶
Package greetbot is a minimal, real Telegram bot used to exercise Chatwright end-to-end. It speaks the Telegram Bot API via the tgbotapi client library; its outbound calls are redirected to whatever Bot API host it is constructed with (Chatwright's emulator in tests, https://api.telegram.org in production).
It is intentionally tiny: /start offers a language choice — picking one edits that same message in place, translating it, and is remembered for the rest of the chat — and /time replies with the current time. The point is to prove a genuine Telegram-protocol bot — parsing real updates, tracking per-chat state, editing its own messages, and sending via the real client — can be driven by Chatwright over HTTP.
Index ¶
Constants ¶
const TimeLayout = "15:04:05 MST"
TimeLayout is the format /time replies use. Exported so tests can compute the exact expected reply for a given instant without duplicating the format.
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
FormatTime renders t (in UTC) the way /time replies do.