{"id":13681112,"url":"https://github.com/bostrot/telegram-support-bot","last_synced_at":"2025-05-15T11:02:24.059Z","repository":{"id":39585158,"uuid":"95918398","full_name":"bostrot/telegram-support-bot","owner":"bostrot","description":"A Telegram ticketing/supporting system.","archived":false,"fork":false,"pushed_at":"2025-04-02T23:20:32.000Z","size":966,"stargazers_count":491,"open_issues_count":28,"forks_count":167,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-04T07:05:19.847Z","etag":null,"topics":["bot","staff-groups","support-bot","telegraf-framework","telegram","telegram-bot","telegram-support-bot","ticket","ticketing","ticketing-system"],"latest_commit_sha":null,"homepage":"https://botspace.bostrot.com","language":"TypeScript","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/bostrot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bostrot"}},"created_at":"2017-06-30T19:35:11.000Z","updated_at":"2025-04-03T01:00:13.000Z","dependencies_parsed_at":"2023-09-27T19:13:53.556Z","dependency_job_id":"b1b0488c-5713-40b4-a172-df5c6665f837","html_url":"https://github.com/bostrot/telegram-support-bot","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrot%2Ftelegram-support-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrot%2Ftelegram-support-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrot%2Ftelegram-support-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrot%2Ftelegram-support-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bostrot","download_url":"https://codeload.github.com/bostrot/telegram-support-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441906,"owners_count":21104099,"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":["bot","staff-groups","support-bot","telegraf-framework","telegram","telegram-bot","telegram-support-bot","ticket","ticketing","ticketing-system"],"created_at":"2024-08-02T13:01:26.520Z","updated_at":"2025-05-15T11:02:24.042Z","avatar_url":"https://github.com/bostrot.png","language":"TypeScript","funding_links":["https://github.com/sponsors/bostrot"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to Telegram Support Bot 👋\u003c/h1\u003e\r\n\u003ch2 align=\"center\"\u003enow also with Signal Support\u003c/h2\u003e\r\n\r\n[![Bot API Version](https://img.shields.io/badge/Bot%20API-v6.6-f36caf.svg?style=for-the-badge)](https://core.telegram.org/bots/api)\r\n[![NPM Version](https://img.shields.io/npm/v/grammy.svg?style=for-the-badge)](https://www.npmjs.com/)\r\n[![node](https://img.shields.io/node/v/grammy.svg?style=for-the-badge)](https://www.npmjs.com/package/)\r\n![js-google-style](https://img.shields.io/badge/code%20style-google-brightgreen.svg?style=for-the-badge)\r\n[![Documentation](https://img.shields.io/badge/DOCUMENTATION-WIKI-green?style=for-the-badge)](https://github.com/bostrot/telegram-support-bot/wiki)\r\n\r\n\u003e TSB is a support bot for Telegram and Signal. It lets users create tickets which will be sent to a staff group and can be answered by a reply.  \r\n\u003e Now also supports LLMs (e.g. OpenAI) to automatically assist users.\r\n\r\n\u003ctable\u003e\r\n\u003ctr\u003e\r\n\u003cth\u003e\u003cimg src=\"https://i.imgur.com/du5KZ1C.jpg\" /\u003e\u003c/th\u003e\r\n\u003cth\u003e\u003cimg src=\"https://i.imgur.com/N2002b0.jpg\" /\u003e\u003c/th\u003e\r\n\u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\u003e 🚀 **Hosted solution**: Get it [here at botspace](https://botspace.bostrot.com)!\r\n\r\n## ✨ Features\r\n\r\nWhen a user sends a message to the support chat it will create a ticket which will be forwarded to the staff group. Any admin in the staff group may answer that ticket by just replying to it. Salutation is added automatically. Photos will be forwarded too.\r\n\r\n- [x] File forwarding from and to user\r\n- [x] Database for handling open and closed tickets\r\n- [x] Restrict users\r\n- [x] Simple anti spam system\r\n- [x] Send tickets to different staff groups\r\n- [x] Private reply to user\r\n- [x] Anonymize users\r\n- [x] Auto reply based on keywords [beta]\r\n- [x] Web chat [beta]\r\n- [x] **Staff groups can now be on Telegram _or_ Signal**\r\n- [x] **LLM support (OpenAI, OpenAI-compatible APIs)** – generate automatic responses using large language models\r\n\r\n## 🤖 OpenAi Integration\r\n\r\nThe bot can now optionally connect to an LLM like OpenAI (or any OpenAI-compatible API) to automatically respond to users, especially for common questions or when no staff is available.\r\n\r\nYou can enable this by configuring the following in your `config.yaml`:\r\n\r\n```yaml\r\nuse_llm: true # Will enable show_auto_replied when set to true\r\nllm_api_key: 'API_KEY'\r\nllm_base_url: 'https://api.openai.com/v1'\r\nllm_model: 'gpt-4o-mini'\r\nllm_knowledge: \u003e\r\n    Q: What is Botspace?\r\n    A: Botspace is a cloud-based project management tool designed for teams to collaborate, track tasks, and manage workflows efficiently.\r\n\r\n    Q: What platforms are supported?\r\n    A: Web, iOS, and Android.\r\n```\r\n\r\n\u003e Use cases: FAQ generation, fallback replies when no staff replies, 24/7 automated assistant, hybrid staff-AI workflows.\r\n\r\n## 📜 Commands\r\n\r\nCurrently the support chat offers these commands (staff commands):\r\n\r\n- `/open` - lists all open tickets (messages where no one has replied yet)\r\n- `/reopen` - reopen a closed ticket\r\n- `/close` - close a ticket manually (in case someone writes 'thank you')\r\n- `/ban` - ban a person from writing to your chat\r\n\r\nUser commands:\r\n\r\n- `/start` - tells the user how to use this bot\r\n- `/help` - an overview over the commands or some explanation for the user\r\n- `/faq` - shows the FAQ\r\n- `/id` - returns your Telegram or Signal id and the group chat id\r\n\r\n## 📦 Install\r\n\r\nSee the [wiki](https://github.com/bostrot/telegram-support-bot/wiki) for more detailed instructions.\r\n\r\n```bash\r\nmv config/config-sample.yaml config.yaml\r\ndocker-compose up -d\r\n```\r\n\r\n## 📝 Upgrading from older versions\r\n\r\nThere are some breaking changes in the new versions. Please read the following instructions carefully when updating.\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eclick here to show\u003c/summary\u003e\r\n\r\nSince version v4 this bot uses the grammY Telegram Bot Framework instead of the telegraf framework for various reasons.\r\n\r\n### Upgrading to v4.0.0\r\n\r\nMake sure you add the new settings strings to your config.yaml file. Check the config-sample.yaml for all configs.\r\nHere are some of the new settings that you should add when migrating:\r\n\r\n    parse_mode: 'Markdown' # DO NOT CHANGE!\r\n    autoreply: (see config-sample.yaml for an example)\r\n\r\nThe config-sample.yaml settings now all use markdown instead of HTML so you have to adjust that. e.g. instead of \u003cbr/\u003e line break use \\n instead. For a full list check the telegram bot API docs.\r\n\r\nUpgrade to the new version. e.g. by pulling the main branch from GitHub or using the docker image bostrot/telegram-support-bot:4.0.0.\r\n\r\nStart it.\r\n\r\nThe old database should work with the new version without changing anything.\r\n\r\n### Upgrading to v3.0.0\r\n\r\nThe latest version uses a new config file in YAML format which would break old versions.\r\n\r\nIn order to make old versions work with the master you would need to use the new config.yaml file instead of the config.ts file from before. The easiest would be if you copy the config-sample.yaml to config.yaml (both in the config folder) and edit the settings similar to your old config.ts file. There is no need to delete the database file so old tickets can be kept open.\r\n\r\n\u003c/details\u003e\r\n\r\nYou might also want to check out the [wiki](https://github.com/bostrot/telegram-support-bot/wiki) for more info.\r\n\r\n## Author\r\n\r\n👤 **Eric Trenkel**\r\n\r\n- Website: [erictrenkel.com](erictrenkel.com)\r\n- Github: [@bostrot](https://github.com/bostrot)\r\n- LinkedIn: [@erictrenkel](https://linkedin.com/in/erictrenkel)\r\n\r\n👥 **Contributors**\r\n\r\n[![Contributors](https://contrib.rocks/image?repo=bostrot/telegram-support-bot)](https://github.com/bostrot/telegram-support-bot/graphs/contributors)\r\n\r\n## 🤝 Contributing\r\n\r\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/bostrot/telegram-support-bot/issues). You can also take a look at the [contributing guide](https://github.com/bostrot/telegram-support-bot/blob/master/CONTRIBUTING.md).\r\n\r\n## Show your support\r\n\r\nGive a ⭐️ if this project helped you!\r\n\r\n## 📝 License\r\n\r\nCopyright © 2025 [Eric Trenkel](https://github.com/bostrot).  \r\nThis project is [GPL-3.0](https://github.com/bostrot/telegram-support-bot/blob/master/LICENSE) licensed.\r\n\r\n---\r\n\r\n_Not found what you were looking for? Check out the [Wiki](https://github.com/bostrot/telegram-support-bot/wiki)_\r\n\r\nIf you need help or need a hosted solution of this check out [Botspace](https://botspace.bostrot.com) for a one-click setup.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbostrot%2Ftelegram-support-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbostrot%2Ftelegram-support-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbostrot%2Ftelegram-support-bot/lists"}