{"id":41416528,"url":"https://github.com/yi-jiayu/ted","last_synced_at":"2026-01-23T13:54:37.193Z","repository":{"id":57517899,"uuid":"247043303","full_name":"yi-jiayu/ted","owner":"yi-jiayu","description":"Go bindings for the Telegram Bot API","archived":false,"fork":false,"pushed_at":"2021-03-21T09:24:38.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T14:59:27.620Z","etag":null,"topics":["go","telegram"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yi-jiayu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-13T10:17:07.000Z","updated_at":"2021-03-21T09:24:40.000Z","dependencies_parsed_at":"2022-09-15T21:52:33.920Z","dependency_job_id":null,"html_url":"https://github.com/yi-jiayu/ted","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yi-jiayu/ted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yi-jiayu%2Fted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yi-jiayu%2Fted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yi-jiayu%2Fted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yi-jiayu%2Fted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yi-jiayu","download_url":"https://codeload.github.com/yi-jiayu/ted/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yi-jiayu%2Fted/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","telegram"],"created_at":"2026-01-23T13:54:36.550Z","updated_at":"2026-01-23T13:54:37.186Z","avatar_url":"https://github.com/yi-jiayu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![ted](https://user-images.githubusercontent.com/11734309/76626866-e329ca80-6574-11ea-87da-b158d6fff768.png)\n\n# ted\nGo bindings for the Telegram Bot API\n\n## Usage\n\nTed's API is loosely based on the Go standard library's `net/http` package.\n\nCreate a `ted.Bot` with your bot token and HTTP client, then build your request and send it:\n\n```go\nbot := ted.Bot{\n    Token:      \"BOT_TOKEN\",\n    HTTPClient: http.DefaultClient,\n}\nreq := ted.SendMessageRequest{\n    ChatID:    123,\n    Text:      \"*Hello, World*\",\n    ParseMode: \"Markdown\",\n}\nres, err := bot.Do(req)\nif err != nil {\n    if response, ok := err.(ted.Response); ok {\n        // handle Telegram error\n    }\n    // handle HTTP error\n}\n```\n\nThe bot also handles making multiple requests concurrently:\n\n```go\nanswerCallbackQueryRequest := ted.AnswerCallbackQueryRequest{\n    CallbackQueryID: \"abc\",\n}\nsendMessageRequest := ted.SendMessageRequest{\n    ChatID:    123,\n    Text:      \"*Hello, World*\",\n    ParseMode: \"Markdown\",\n}\n// err will be nil if all requests were successful\nresponses, err := bot.DoMulti(answerCallbackQueryRequest, sendMessageRequest)\n```\n\nTo use the result, unmarshal it just as you would a HTTP response body:\n\n```go\ngetMe := GetMeRequest{}\nres, err := bot.Do(getMe)\nif err != nil {\n    panic(err)\n}\nvar me User\nerr = json.Unmarshal(res.Result, \u0026me)\nif err != nil {\n    panic(err)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyi-jiayu%2Fted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyi-jiayu%2Fted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyi-jiayu%2Fted/lists"}