{"id":15710188,"url":"https://github.com/dinoleung/teledart","last_synced_at":"2025-10-12T01:42:01.034Z","repository":{"id":41274778,"uuid":"132086088","full_name":"DinoLeung/TeleDart","owner":"DinoLeung","description":"A Dart library interfacing with the latest Telegram Bot API.","archived":false,"fork":false,"pushed_at":"2024-04-06T06:30:11.000Z","size":1264,"stargazers_count":313,"open_issues_count":13,"forks_count":69,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-04T13:59:39.274Z","etag":null,"topics":["dart","telegram","telegram-bot","telegram-bot-api","telegram-bot-sdk"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/teledart","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DinoLeung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"DinoLeung","tidelift":null,"community_bridge":null,"custom":null}},"created_at":"2018-05-04T04:19:25.000Z","updated_at":"2025-02-08T07:24:46.000Z","dependencies_parsed_at":"2024-01-07T18:08:41.261Z","dependency_job_id":"ec46245f-dea1-47ac-a9e9-0ed00430f64e","html_url":"https://github.com/DinoLeung/TeleDart","commit_stats":{"total_commits":466,"total_committers":20,"mean_commits":23.3,"dds":0.5107296137339056,"last_synced_commit":"b87fab958c58c33e7e0dec8416213a0ab0888dca"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoLeung%2FTeleDart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoLeung%2FTeleDart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoLeung%2FTeleDart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoLeung%2FTeleDart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DinoLeung","download_url":"https://codeload.github.com/DinoLeung/TeleDart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190250,"owners_count":20898702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dart","telegram","telegram-bot","telegram-bot-api","telegram-bot-sdk"],"created_at":"2024-10-03T21:04:18.538Z","updated_at":"2025-10-12T01:41:56.009Z","avatar_url":"https://github.com/DinoLeung.png","language":"Dart","funding_links":["https://ko-fi.com/DinoLeung"],"categories":[],"sub_categories":[],"readme":"# TeleDart\n\nA clean implementation of [Telegram bot API](https://core.telegram.org/bots/api) allows you to create your own easily.\n\n![TeleDart](https://raw.githubusercontent.com/DinoLeung/TeleDart/master/example/dash_paper_plane.svg?sanitize=true)\n\n[![Bot API Version](https://img.shields.io/badge/Bot%20API-6.8-blue.svg?style=flat-square)](https://core.telegram.org/bots/api)\n[![Dart Version](https://img.shields.io/badge/Dart-3.1-blue.svg?style=flat-square)](https://dart.dev)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)\n\n[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=DinoLeung\u0026repo=TeleDart)](https://github.com/DinoLeung/TeleDart)\n\n## Creating a Telegram bot\n\nIn order to create a Telegram bot, you need to talk to [@BotFather](https://t.me/botfather) generating a bot token. Simply follow the [instructions](https://core.telegram.org/bots#6-botfather).\n\n## Usage\n\nInitialising the bot:\n\n```dart\nimport 'package:teledart/teledart.dart';\nimport 'package:teledart/telegram.dart';\n\nvoid main() {\n  var BOT_TOKEN = 'YOUR_BOT_TOKEN_FROM_BOT_FATHER';\n  final username = (await Telegram(BOT_TOKEN).getMe()).username;\n  var teledart = TeleDart(BOT_TOKEN, Event(username!));\n\n  teledart.start()\n}\n```\n\nA simple usage example:\n\n```dart\nteledart.onMessage(keyword: 'Fight for freedom')\n    .listen((message) =\u003e message.reply('Stand with Hong Kong'));\n```\n\nUsing bot commands:\n\n```dart\n// Long way\nteledart.onMessage(entityType: 'bot_command', keyword: 'start')\n    .listen((message) =\u003e teledart.sendMessage(message.chat.id, 'Hello TeleDart!'));\n\n// Short way (recommended)\nteledart.onCommand('glory')\n    .listen((message) =\u003e message.reply('to Ukraine!'));\n```\n\nModifying [Stream](https://www.dartlang.org/tutorials/language/streams#methods-that-modify-a-stream):\n\n```dart\nteledart\n    .onMessage(keyword: 'dart')\n    .where((message) =\u003e message.text?.contains('telegram') ?? false)\n    .listen((message) =\u003e message.replyPhoto(\n        //  io.File('example/dash_paper_plane.png'),\n        'https://raw.githubusercontent.com/DinoLeung/TeleDart/master/example/dash_paper_plane.png',\n        caption: 'This is how the Dart Bird and Telegram are met'));\n```\n\n[Inline mode](https://core.telegram.org/bots/api#inline-mode) example:\n\n```dart\nteledart.onInlineQuery().listen((inlineQuery) =\u003e inlineQuery.answer([\n      InlineQueryResultArticle(\n          id: 'ping',\n          title: 'ping',\n          inputMessageContent: InputTextMessageContent(\n              messageText: '*pong*', parseMode: 'MarkdownV2')),\n      InlineQueryResultArticle(\n          id: 'ding',\n          title: 'ding',\n          inputMessageContent: InputTextMessageContent(\n              messageText: '*_dong_*', parseMode: 'MarkdownV2')),\n    ]));\n```\n\n## Bugs and feature requests\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/DinoLeung/TeleDart/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoleung%2Fteledart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinoleung%2Fteledart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoleung%2Fteledart/lists"}