{"id":15591097,"url":"https://github.com/david-lor/basic_python_telegrambot","last_synced_at":"2025-10-30T09:10:02.227Z","repository":{"id":104268662,"uuid":"133377151","full_name":"David-Lor/Basic_Python_TelegramBot","owner":"David-Lor","description":"A very simple Python tool to send messages via a Telegram bot","archived":false,"fork":false,"pushed_at":"2018-05-14T14:53:25.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T02:58:12.511Z","etag":null,"topics":["python","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/David-Lor.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-14T14:50:47.000Z","updated_at":"2018-12-21T10:40:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"12f0ce4b-06da-4545-9897-ee9880f843bc","html_url":"https://github.com/David-Lor/Basic_Python_TelegramBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FBasic_Python_TelegramBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FBasic_Python_TelegramBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FBasic_Python_TelegramBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FBasic_Python_TelegramBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/David-Lor","download_url":"https://codeload.github.com/David-Lor/Basic_Python_TelegramBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168106,"owners_count":20734391,"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":["python","telegram","telegram-bot"],"created_at":"2024-10-02T23:40:18.144Z","updated_at":"2025-10-30T09:10:02.136Z","avatar_url":"https://github.com/David-Lor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Python Telegram Bot\n\nbasictelebot is a very simple Python tool to send messages via a Telegram bot. It only allows sending simple text messages to a single destination, using Python's requests native library.\n\n## Sending messages with function\n\n```python\nfrom basictelebot import send_message\ntoken = \"my telegram bot token\"\nchatid = 123456\ntext = \"hi there!\"\nsend_message(token, chatid, text)\n```\n\n## Sending messages with object\n\n```python\nfrom basictelebot import TelegramBot\nbot = TelegramBot(\"my telegram bot token\")\nchatid = 123456\ntext = \"hi there!\"\nbot.send_message(chatid, text)\n```\n\n## Was the message sent successfully?\n\nBoth send_message function and class method return True if message was sent successfully, and False if any error of any type happened (including exceptions in requests module).\n\n```python\nfrom basictelebot import send_message\ntoken = \"my telegram bot token\"\nchatids = [123, 456, 789]\ntext = \"hi there!\"\nfor chatid in chatids:\n    if send_message(token, chatid, text):\n        print(\"Message sent to\", chatid)\n    else:\n        print(\"Message could not be sent to\", chatid)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-lor%2Fbasic_python_telegrambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-lor%2Fbasic_python_telegrambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-lor%2Fbasic_python_telegrambot/lists"}