{"id":29507240,"url":"https://github.com/antonmeep/tg.d","last_synced_at":"2026-02-21T20:04:48.820Z","repository":{"id":304772637,"uuid":"145099429","full_name":"AntonMeep/tg.d","owner":"AntonMeep","description":"Telegram Bot API client library for the D programming language","archived":false,"fork":false,"pushed_at":"2018-09-06T10:38:41.000Z","size":361,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T00:59:02.554Z","etag":null,"topics":["api","bot","client","dlang","telegram"],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonMeep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-17T09:15:42.000Z","updated_at":"2023-11-15T20:48:10.000Z","dependencies_parsed_at":"2025-07-15T09:43:37.821Z","dependency_job_id":"c90be632-985c-498a-95a8-90743780fa0b","html_url":"https://github.com/AntonMeep/tg.d","commit_stats":null,"previous_names":["antonmeep/tg.d"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/AntonMeep/tg.d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonMeep%2Ftg.d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonMeep%2Ftg.d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonMeep%2Ftg.d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonMeep%2Ftg.d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonMeep","download_url":"https://codeload.github.com/AntonMeep/tg.d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonMeep%2Ftg.d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29691948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: 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":["api","bot","client","dlang","telegram"],"created_at":"2025-07-16T03:30:37.658Z","updated_at":"2026-02-21T20:04:48.804Z","avatar_url":"https://github.com/AntonMeep.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"tg.d [![Repository](https://img.shields.io/badge/repository-on%20GitLab-orange.svg)](https://gitlab.com/ohboi/tg.d) [![pipeline status](https://gitlab.com/ohboi/tg.d/badges/master/pipeline.svg)](https://gitlab.com/ohboi/tg.d/pipelines) [![coverage report](https://gitlab.com/ohboi/tg.d/badges/master/coverage.svg)](https://gitlab.com/ohboi/tg.d/pipelines) [![MIT Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://gitlab.com/ohboi/tg.d/blob/master/LICENSE) [![Package version](https://img.shields.io/dub/v/tg-d.svg)](https://gitlab.com/ohboi/tg.d/tags)\n========\n\n**tg.d** is a Telegram Bot API client implementation built to make fast and safe bots with the help of the D programming language.\n\n\u003e Note that project's development happens on the [GitLab](https://gitlab.com/ohboi/tg.d).\n\u003e GitHub repository is a mirror, it might *not* always be up-to-date.\n\n## Documentation\n\nAPI reference is available [here](ohboi.gitlab.io/tg.d). Telegram Bot API documentation is available [here](https://core.telegram.org/bots/api).\n\n## Getting updates\n\nCurrently, only long polling is supported. Use [`TelegramBot.pollUpdates`](https://ohboi.gitlab.io/tg.d/tg/d/TelegramBot.pollUpdates.html) which provides high-level abstraction over [`TelegramBot.getUpdates`](https://ohboi.gitlab.io/tg.d/tg/d/TelegramBot.getUpdates.html).\n\n```D\nimport tg.d;\n\nvoid main() {\n\twhile(true) {\n\t\tforeach(update; TelegramBot(\"token\").pollUpdates) {\n\t\t\t// Do something with `update`\n\t\t}\n\t}\n}\n```\n\nData structures such as `Update`, `Message` and others have `isNull` property which can be used to check if field has a value:\n```D\nif(!update.message.isNull) {\n\t// Update is a message\n} else if(!update.edited_message.isNull) {\n\t// Update is a edited message\n} else ...\n```\n\n## Examples\n\nAre in the `examples` directory:\n\n| name | description |\n|------|-------------|\n| [action.d](examples/action.d) | Shows all kinds of actions that bot can broadcast to users (for example: `... typing`, `... sending photo`)\n| [buttons.d](examples/buttons.d) | Sends messages with attached inline keyboard |\n| [echo.d](examples/echo.d) | Sends user's messages back |\n| [edit.d](examples/edit.d) | Edits own messages |\n| [livelocation.d](examples/livelocation.d) | Sends location and updates it |\n| [reply.d](examples/reply.d) | Replies to user's messages |\n| [sendthings.d](examples/sendthings.d) | Sends photos, videos, audio files, locations, venues and other kinds of data |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmeep%2Ftg.d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonmeep%2Ftg.d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmeep%2Ftg.d/lists"}