{"id":17543176,"url":"https://github.com/vb64/telegram.botan","last_synced_at":"2025-03-29T05:27:52.624Z","repository":{"id":85006066,"uuid":"91106144","full_name":"vb64/telegram.botan","owner":"vb64","description":"appmetrica.yandex.ru + pyTelegramBotAPI","archived":false,"fork":false,"pushed_at":"2017-05-14T14:29:46.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T15:55:32.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/vb64.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":"2017-05-12T15:40:41.000Z","updated_at":"2017-05-14T13:52:42.000Z","dependencies_parsed_at":"2023-03-01T03:45:37.419Z","dependency_job_id":null,"html_url":"https://github.com/vb64/telegram.botan","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/vb64%2Ftelegram.botan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb64%2Ftelegram.botan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb64%2Ftelegram.botan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb64%2Ftelegram.botan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vb64","download_url":"https://codeload.github.com/vb64/telegram.botan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246144207,"owners_count":20730371,"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":[],"created_at":"2024-10-21T00:23:08.080Z","updated_at":"2025-03-29T05:27:52.610Z","avatar_url":"https://github.com/vb64.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram.botan\n\n[pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI) + [appmetrica.yandex.ru botan](https://github.com/botanio/sdk)\n\n## Requirements\n\n```\npip install pyTelegramBotAPI\nwget https://raw.githubusercontent.com/botanio/sdk/master/botan.py\n```\n\n## Usage\n\n```python\nfrom pyTelegramBotAPI_botan import Botan\n\nbot = Botan(\"telegram_bot_token\", \"metrica_api_token\")\n```\n\nset up 'start_prompt' function as handler for /start command in private chat\nevery call of this handler automatically track to metrica with name='private.command.start'\n\n```python\n@bot.private_command(\"start\")\ndef start_prompt(message):\n    bot.reply_to(message, \"Hello, private chat!\")\n```\n\nset up 'member_left' function as handler for event, when any member left group chat\nautomatically track with name='group.left_chat_member'\n\n```python\n@bot.group_event(\"left_chat_member\")\ndef member_left(message):\n    bot.reply_to(message, \"Oh, we lost him :(\")\n```\n\nset up 'member_help' function as handler for callback query in group chat,\nthat contain \"help_button_pressed\" substring in callback_query.data\nautomatically track with name='group.callback.help_button_pressed'\n\n```python\n@bot.group_callback(\"help_button_pressed\")\ndef member_help(call):\n    bot.reply_to(call.message, \"Someone need help in our group!\")\n```\n\navailable decorators:\n\n```python\n@bot.private_command(command_name)\n@bot.group_command(command_name)\n@bot.private_event(content_type)\n@bot.group_event(content_type)\n@bot.private_callback(substring_in_callback_data)\n@bot.group_callback(substring_in_callback_data)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvb64%2Ftelegram.botan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvb64%2Ftelegram.botan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvb64%2Ftelegram.botan/lists"}