{"id":31779830,"url":"https://github.com/hydepwns/telegram-partner-bot","last_synced_at":"2025-10-18T03:22:36.020Z","repository":{"id":260357367,"uuid":"880939319","full_name":"Hydepwns/telegram-partner-bot","owner":"Hydepwns","description":"automate the creation and management of Telegram groups","archived":false,"fork":false,"pushed_at":"2024-11-08T13:55:13.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T14:43:31.407Z","etag":null,"topics":["telegram"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Hydepwns.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":"2024-10-30T16:20:54.000Z","updated_at":"2024-11-08T13:55:17.000Z","dependencies_parsed_at":"2024-10-30T22:23:37.330Z","dependency_job_id":"18e18517-f96c-4fba-a132-1ca58c80c184","html_url":"https://github.com/Hydepwns/telegram-partner-bot","commit_stats":null,"previous_names":["hydepwns/telegram-partner-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hydepwns/telegram-partner-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hydepwns%2Ftelegram-partner-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hydepwns%2Ftelegram-partner-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hydepwns%2Ftelegram-partner-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hydepwns%2Ftelegram-partner-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hydepwns","download_url":"https://codeload.github.com/Hydepwns/telegram-partner-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hydepwns%2Ftelegram-partner-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003163,"owners_count":26083533,"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-10T02:00:06.843Z","response_time":62,"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":["telegram"],"created_at":"2025-10-10T07:57:41.338Z","updated_at":"2025-10-10T07:57:48.102Z","avatar_url":"https://github.com/Hydepwns.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-partner-bot\r\n\r\n// Credit to github.com/nbmsacha for initial implementation.\r\n\r\n## Table of Contents\r\n\r\n1. [Introduction](#introduction)\r\n2. [Environment Setup](#environment-setup)\r\n3. [Running the Application](#running-the-application)\r\n4. [Missing Elements](#missing-elements)\r\n\r\n## Missing Elements\r\n\r\n- Error Handling\r\n- Logging\r\n- Unit Tests\r\n- Documentation\r\n- Deployment Guide\r\n- Security Measures\r\n\r\n## Introduction\r\n\r\n### Environment Setup\r\n\r\n### `.env.example`\r\n\r\nUse the `.env.example` placeholders as a guide.\r\n\r\n1. **Copy the Template**: Duplicate the `.env.example` file and rename it to `.env`.\r\n\r\n2. **Fill in the Values**: See comments. **Warning**: Setting the `API_ID` and `API_HASH` allows the bot to access your Telegram account and perform actions on your behalf. Ensure these values are kept secure.\r\n\r\n3. **Secure the File**: Ensure that the `.env` file is added to your `.gitignore` to prevent it from being committed to version control.\r\n\r\n**Where to Obtain API_ID and API_HASH**: You can obtain these values by creating a new application on the [Telegram API Development Tools](https://my.telegram.org/apps) page. Follow the instructions to register your application and receive your `API_ID` and `API_HASH`.\r\n\r\n### Running the Application\r\n\r\n1. **Install Dependencies**: Ensure you have [Node.js installed](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs), then run the following command to install the necessary packages:\r\n\r\n   ```bash\r\n   npm install\r\n   ```\r\n\r\n2. **Start the Bot**: The application will automatically generate a session string if it is not present in the `.env` file. Ensure your `.env` file is correctly configured with your `API_ID` and `API_HASH`. You can start the bot using:\r\n\r\n   ```bash\r\n   node src/index.js\r\n   ```\r\n\r\n   The bot will connect to Telegram and start listening for commands.\r\n\r\n3. **Using the Bot**: The bot can handle commands sent to it. For example, you can use the `/set` command to update configuration values dynamically. The bot will respond with confirmation messages.\r\n\r\n4. **Running the Server**: If your application includes a server component, you can start it using:\r\n\r\n   ```bash\r\n   node src/bot/server.js\r\n   ```\r\n\r\n   The server will listen for incoming requests and process them accordingly.\r\n\r\n### Testing\r\n\r\nTo run the tests, use the following command:\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\nThis will execute the test suite located in `src/tests/test_main.js`, which includes tests for the Telegram client initialization and authentication.\r\n\r\n## API Endpoints\r\n\r\n### POST /createGroup\r\n\r\n- **Description**: Creates a new Telegram group.\r\n- **Parameters**:\r\n  - `name`: Name of the group.\r\n  - `type`: Type of the group.\r\n- **Response**:\r\n  - `link`: Invite link to the group.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydepwns%2Ftelegram-partner-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhydepwns%2Ftelegram-partner-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydepwns%2Ftelegram-partner-bot/lists"}