{"id":15168385,"url":"https://github.com/thund3rhawk/telegram-bot","last_synced_at":"2026-02-24T03:32:11.625Z","repository":{"id":250425917,"uuid":"834272541","full_name":"Thund3rHawk/Telegram-Bot","owner":"Thund3rHawk","description":"The project involves creating a Telegram bot using Gemini AI via a webhook for intelligent interactions and automation.","archived":false,"fork":false,"pushed_at":"2024-07-28T20:30:12.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T10:42:01.427Z","etag":null,"topics":["google-generative-ai","ngrok","nodejs","telegram","telegram-bot-api","typescript","webhook-api","yarn"],"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/Thund3rHawk.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-07-26T20:15:48.000Z","updated_at":"2025-01-30T16:28:59.000Z","dependencies_parsed_at":"2024-07-27T10:47:06.712Z","dependency_job_id":"4f83c3ff-1182-4beb-82d5-a14cdcad142b","html_url":"https://github.com/Thund3rHawk/Telegram-Bot","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.10526315789473684","last_synced_commit":"e30f941c41b40c388d760bfa9376138e214b91f7"},"previous_names":["thund3rhawk/telegram-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Thund3rHawk/Telegram-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thund3rHawk%2FTelegram-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thund3rHawk%2FTelegram-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thund3rHawk%2FTelegram-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thund3rHawk%2FTelegram-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thund3rHawk","download_url":"https://codeload.github.com/Thund3rHawk/Telegram-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thund3rHawk%2FTelegram-Bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260273265,"owners_count":22984468,"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":["google-generative-ai","ngrok","nodejs","telegram","telegram-bot-api","typescript","webhook-api","yarn"],"created_at":"2024-09-27T06:02:13.842Z","updated_at":"2025-10-28T08:39:24.173Z","avatar_url":"https://github.com/Thund3rHawk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Bot\n\nThis project integrates Gemini AI into a Telegram bot using a webhook for real-time updates. The following documentation will guide you through setting up the project locally, configuring the webhook, and ensuring seamless bot operation.\n\n## Prerequisites\n\n1. **Telegram Bot Token**: Obtain a bot token from Telegram's BotFather.\n2. **Gemini AI API Access**: Ensure access to the Gemini AI API.\n3. **Ngrok**: Install ngrok to expose your local server to the internet securely.\n4. **Yarn**: Use Yarn as the package manager for the project.\n\n## Setup Instructions\n\n### 1. Cloning the Repository\n\nStart by cloning the repository to your local machine:\n\n```bash\ngit clone https://github.com/Thund3rHawk/Telegram-Bot.git\ncd Telegram-Bot\n```\n\n### 2. Installing Dependencies\n\nUse Yarn to install the necessary dependencies:\n\n```bash\nyarn install\n```\n\n### 3. Configuration\n\nCreate a `.env` file in the root directory to store environment variables:\n\n```env\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nGEMINI_API_KEY=your_gemini_api_key\nPORT=8080\n```\n\nReplace `your_telegram_bot_token` and `your_gemini_api_key` with your actual credentials.\n\n### 4. Running the Server\n\nStart the server using Yarn:\n\n```bash\nyarn dev\n```\n\nYour local server should now be running, listening for incoming webhook requests on the specified port.\n\n### 5. Setting Up the Webhook\n\nTo enable your Telegram bot to receive updates via webhook:\n\n1. **Expose your local server** using ngrok:\n\n   ```bash\n   ngrok http 8080\n   ```\n\n2. **Copy the public `https` URL** provided by ngrok. This URL will serve as the `WEBHOOK_URL`.\n\n3. **Set the webhook URL** with Telegram:\n\n   ```bash\n   https://api.telegram.org/bot\u003cTELEGRAM_BOT_TOKEN\u003e/setWebhook?url=\u003cWEBHOOK_URL\u003e\n   ```\n\n   Replace `\u003cTELEGRAM_BOT_TOKEN\u003e` with your bot's token and `\u003cWEBHOOK_URL\u003e` with the URL from ngrok.\n\n### 6. Updating the Webhook URL\n\nEvery time you restart ngrok, update the webhook URL:\n\n1. **Restart ngrok** and copy the new URL.\n2. **Re-set the webhook URL** with the new ngrok URL.\n\n### 7. Testing the Bot\n\nVerify the webhook setup:\n\n- **Check webhook status**:\n\n  ```bash\n  https://api.telegram.org/bot\u003cTELEGRAM_BOT_TOKEN\u003e/getWebhookInfo\n  ```\n\n- **Send a message** to your bot to ensure it responds correctly.\n\n## Troubleshooting\n\n- Ensure ngrok is running and accessible.\n- Check server logs for errors in handling webhook requests.\n- Verify the bot token and webhook URL format.\n\n## Conclusion\n\nThis README covers the basic setup, configuration, and maintenance of a Gemini AI Telegram bot with a webhook. For more detailed information on the Gemini AI API and Telegram Bot API, refer to their official documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthund3rhawk%2Ftelegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthund3rhawk%2Ftelegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthund3rhawk%2Ftelegram-bot/lists"}