# go-telegram Codegen Implementation Plan (Plan 2) > **For agentic workers:** REQUIRED SUB-SKILL: superpowers:subagent-driven-development. Tasks use checkbox (`- [ ]`) syntax. **Goal:** Build the two-stage codegen pipeline (`cmd/scrape` → `internal/spec/api.json` → `cmd/genapi` → `api/*.gen.go`), regenerate the full Telegram Bot API surface from a committed HTML snapshot, replace the hand-coded `api/` slice from Plan 1 with the generated code, and wire `make snapshot` / `make regen` / `make regen-from-fixture` / `make test-update-golden`. **Architecture:** Stage 1 walks `
Test fixture; not a real release.
This object represents a Telegram user or bot.
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique identifier. |
| is_bot | Boolean | True, if this user is a bot. |
| first_name | String | User's or bot's first name. |
| last_name | String | Optional. User's or bot's last name. |
This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
Use this method to send text messages. On success, the sent Message is returned.
| Parameter | Type | Required | Description |
|---|---|---|---|
| chat_id | Integer or String | Yes | Unique identifier for the target chat. |
| text | String | Yes | Text of the message to be sent. |
| parse_mode | String | Optional | Mode for parsing entities in the message text. |
Use this method to send general files. On success, the sent Message is returned.
| Parameter | Type | Required | Description |
|---|---|---|---|
| chat_id | Integer | Yes | Unique identifier for the target chat. |
| document | InputFile or String | Yes | File to send. |
| caption | String | Optional | Document caption. |
Use this method to receive incoming updates using long polling. Returns an Array of Update objects.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | Integer | Optional | Limits the number of updates to be retrieved. |
paragraphs (until the // next h4 / h3 / table / list). Tables and Lists hold raw nodes for // later parsing by the table/oneof extractors. type section struct { Title string Description string Tables []*html.Node //
| (or | ) children of a |
|---|