{"id":24273342,"url":"https://github.com/syrup/dynamic-ip-fetcher-bot","last_synced_at":"2026-04-29T13:32:54.239Z","repository":{"id":272134691,"uuid":"915410714","full_name":"Syrup/dynamic-ip-fetcher-bot","owner":"Syrup","description":"Public IP Fetcher","archived":false,"fork":false,"pushed_at":"2025-09-26T07:39:40.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-24T05:56:30.342Z","etag":null,"topics":["bun","dynamic-ip","ipv4","telegram-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Syrup.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,"zenodo":null}},"created_at":"2025-01-11T19:20:45.000Z","updated_at":"2025-09-26T07:39:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"61be46a7-0109-4010-a7c4-154069885845","html_url":"https://github.com/Syrup/dynamic-ip-fetcher-bot","commit_stats":null,"previous_names":["syrup/dynamic-ip-fetcher-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Syrup/dynamic-ip-fetcher-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syrup%2Fdynamic-ip-fetcher-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syrup%2Fdynamic-ip-fetcher-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syrup%2Fdynamic-ip-fetcher-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syrup%2Fdynamic-ip-fetcher-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Syrup","download_url":"https://codeload.github.com/Syrup/dynamic-ip-fetcher-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syrup%2Fdynamic-ip-fetcher-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32427543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T12:24:25.982Z","status":"ssl_error","status_checked_at":"2026-04-29T12:24:24.439Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bun","dynamic-ip","ipv4","telegram-bot","typescript"],"created_at":"2025-01-15T19:48:25.517Z","updated_at":"2026-04-29T13:32:54.222Z","avatar_url":"https://github.com/Syrup.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic IP Fetcher\n\nThis project is a Telegram bot that fetches and displays the system public IP address. It is particularly useful for users with dynamic IP addresses.\n\n## Dependencies\n\n- `grammy`\n- `undici`\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\n## Setting Up Environment Variables\n\n1. Create a `.env` file in the root directory of your project.\n2. Add the following content to the `.env` file:\n\n```\nBOT_TOKEN=\u003cyour_bot_token\u003e\n\n# Optional, you can set the user ID on the config.ts file\nUSER_ID=\u003cyour_user_id\u003e\n```\n\nExample:\n\n```\nBOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11\n```\n\n### Setting User ID\n\nTo set the user ID, open the `config.ts` file and update the `userId` property with your user ID:\n\n```typescript\nexport default {\n  userId: \u003cyour_user_id\u003e,\n} as const;\n```\n\nExample:\n\n```typescript\nexport default {\n  userId: 123456789,\n} as const;\n```\n\n### Getting Your User ID\n\nTo get your `userId`, follow these steps:\n\n1. Start the bot by running the command:\n\n```bash\nbun run index.ts\n```\n\n2. Open a chat with your bot on Telegram.\n3. Send the command `/getid`.\n4. The bot will reply with your user ID.\n\nAdditionally, set the bot to can't join group through BotFather to ensure only authorized users can access it. To do this, follow these steps:\n\n1. Open a chat with [BotFather](https://t.me/botfather) on Telegram.\n2. Send the command `/mybots` and select your bot.\n3. Click on \"Bot Settings\".\n4. Click on \"Group Privacy\".\n5. Select \"Turn on\" to prevent the bot from joining groups.\n\n## Running the Project\n\nTo run:\n\n```bash\nbun run index.ts\n```\n\nThis project was created using `bun init` in bun v1.1.42. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.\n\n## Auto Run Script on Boot on Linux\n\nTo configure the bot to run on boot in Linux, you can use `systemctl`:\n\n1. Create a new service file in `/etc/systemd/system/`:\n\n```bash\nsudo nano /etc/systemd/system/ipfetcher.service\n```\n\n2. Add the following content to the service file:\n\n```ini\n[Unit]\nDescription=IP Fetcher Telegram Bot\nAfter=network.target\n\n[Service]\nExecStart=/path/to/bun run /path/to/index.ts\nRestart=always\nUser=your-username\nEnvironment=DEBUG=\"grammy*\"\nEnvironment=NODE_ENV=production\n\n[Install]\nWantedBy=multi-user.target\n```\n\nExample configured path:\n\n```ini\n[Service]\nExecStart=/usr/local/bin/bun run /home/user/ipfetcher/index.ts\n```\n\n3. Enable and start the service:\n\n```bash\nsudo systemctl enable ipfetcher\nsudo systemctl start ipfetcher\n```\n\n\u003e [!NOTE]\n\u003e Please check how to configure auto run script on boot for your OS (Operating System).\n\n## Usage Examples\n\n### Example 1: Fetching Public IP\n\n1. Start the bot by running the command:\n\n```bash\nbun run index.ts\n```\n\n2. Open a chat with your bot on Telegram.\n3. Send the command `/start`.\n4. The bot will reply with your public IP address.\n\n### Example 2: Unauthorized User\n\n1. Start the bot by running the command:\n\n```bash\nbun run index.ts\n```\n\n2. Open a chat with your bot on Telegram using a different account (not the owner).\n3. Send the command `/start`.\n4. The bot will reply with \"You are not authorized to use this bot.\"\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Submit a pull request with a clear description of your changes.\n\n## Contact\n\nFor any questions or issues, please contact me at [Discord](https://discord.com/users/681843628317868049) or email me at \u003cfabian.maulana@sxrup.xyz\u003e.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n\nYou are free to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the conditions mentioned in the `LICENSE` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrup%2Fdynamic-ip-fetcher-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyrup%2Fdynamic-ip-fetcher-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrup%2Fdynamic-ip-fetcher-bot/lists"}