{"id":15722306,"url":"https://github.com/spikedpaladin/telegramglib","last_synced_at":"2026-02-15T03:03:30.388Z","repository":{"id":137326700,"uuid":"357515711","full_name":"SpikedPaladin/TelegramGLib","owner":"SpikedPaladin","description":"Telegram bot API written in Vala","archived":false,"fork":false,"pushed_at":"2024-02-16T12:48:06.000Z","size":458,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T23:43:37.452Z","etag":null,"topics":["glib","telegram","telegram-bot","telegram-bot-api","telegram-bots","vala","vala-libraries","vala-library"],"latest_commit_sha":null,"homepage":"","language":"Vala","has_issues":true,"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/SpikedPaladin.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}},"created_at":"2021-04-13T10:39:23.000Z","updated_at":"2025-03-23T20:05:26.000Z","dependencies_parsed_at":"2023-04-08T06:01:40.858Z","dependency_job_id":"53160704-efe8-47fd-9084-d4701678f5a6","html_url":"https://github.com/SpikedPaladin/TelegramGLib","commit_stats":{"total_commits":141,"total_committers":2,"mean_commits":70.5,"dds":"0.028368794326241176","last_synced_commit":"1746734b9f3c6f04183736c7b2fddf7f03435245"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/SpikedPaladin/TelegramGLib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikedPaladin%2FTelegramGLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikedPaladin%2FTelegramGLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikedPaladin%2FTelegramGLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikedPaladin%2FTelegramGLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpikedPaladin","download_url":"https://codeload.github.com/SpikedPaladin/TelegramGLib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikedPaladin%2FTelegramGLib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722730,"owners_count":26034461,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["glib","telegram","telegram-bot","telegram-bot-api","telegram-bots","vala","vala-libraries","vala-library"],"created_at":"2024-10-03T22:06:30.107Z","updated_at":"2025-10-07T04:39:44.899Z","avatar_url":"https://github.com/SpikedPaladin.png","language":"Vala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TelegramGLib [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.1-blue)](https://core.telegram.org/bots/api#february-16-2024)\n[![Telegram group badge](https://img.shields.io/badge/Telegram-Join_the_chat-2CA5E0?style=flat\u0026logo=telegram)](https://t.me/vala_lang)  \nTelegramGLib is a bot api for telegram written in Vala\n\n## Features\n- Inline mode support\n- Async request sending\n- File uploading\n- Handlers support\n- Android support\n\n## Sample\n\n#### Vala\n```vala\nusing Telegram;\n\nvoid main() {\n    var bot = new Bot() {\n        token = \"YOUR_BOT_TOKEN\"\n    };\n    \n    // Reply to message with text 'priority'\n    // This MessageHandler will have more priority because\n    // It was added before handler which replies on any message\n    bot.add_handler(new MessageHandler(\"priority\", msg =\u003e {\n        bot.send.begin(new SendMessage() {\n            chat_id = msg.chat.id,\n            text = \"Handler priority example\"\n        });\n    }));\n    \n    // Reply to any message\n    // Except handlers with same type added before this\n    bot.add_handler(new MessageHandler(null, msg =\u003e {\n        bot.send.begin(new SendMessage() {\n            chat_id = msg.chat.id,\n            text = @\"Your message: $(msg.text)\"\n        });\n    }));\n    \n    // Send greeting message if user started bot\n    bot.add_handler(new CommandHandler(\"start\", msg =\u003e {\n        bot.send.begin(new SendMessage() {\n            chat_id = msg.chat.id,\n            text = \"Welcome!\"\n        });\n    // Check if chat is private\n    }, msg =\u003e msg.chat.type == Chat.Type.PRIVATE));\n    \n    bot.start();\n}\n```\n\n##### Compile with\n\n    $ valac --pkg telegram-glib-1.0 main.vala\n    $ ./main\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003ePython\u003c/b\u003e\u003c/summary\u003e\n\n```python\nimport gi\n\ngi.require_version('Telegram', '1.0')\nfrom gi.repository import Telegram\n\nclass PingBot(Telegram.Bot):\n    \n    def __init__(self, **kargs):\n        super().__init__(**kargs)\n        self.token = 'YOUR_BOT_TOKEN'\n    \n    def do_on_message(self, message):\n        if message.text is not None:\n            msg = Telegram.SendMessage()\n            msg.chat_id = message.chat.id\n            msg.text = 'Your message: ' + message.text\n            \n            self.send(msg)\n        \n        return True\n\nbot = PingBot()\nbot.start()\n```\n\u003c/details\u003e\n\n##### Result\n![Screenshot](./result.png)\n\n##### More examples\n\n* [TelegramGLib-Examples](https://github.com/SpikedPaladin/TelegramGLib-Examples) repository\n\n## Uploading files\n```vala\nvar request = new SendPhoto();\nrequest.chat_id = update.message.chat.id;\n// To upload local file use prefix 'file://'\n// File will be uploaded from local folder (/home/paladin/Pictures/upload.jpg)\nrequest.photo = \"file:///home/paladin/Pictures/upload.jpg\";\n\nsend.begin(request);\n```\n\n## Installation\n\n**[Installation for Android (Guide)](https://gist.github.com/SpikedPaladin/c51d95773fa851c6e54e8ae1cf4e5b10)**\n\n### ArchLinux\nDownload TelegramGLib from AUR\n\n    $ yay -S telegram-glib\n\n### Build manualy\n\n#### Dependencies\n\u003e json-glib-1.0  \n\u003e libsoup-3.0\n\n#### Installing\n\n    $ meson setup --prefix=/usr build\n    $ ninja -C build install\n\n## TODO\n- [ ] Webhook support\n- [ ] Write documentation\n- [ ] Telegram passport support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspikedpaladin%2Ftelegramglib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspikedpaladin%2Ftelegramglib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspikedpaladin%2Ftelegramglib/lists"}