{"id":20980942,"url":"https://github.com/muhammadrafihq/telegram-bot-ai-gemini","last_synced_at":"2025-03-13T10:18:06.561Z","repository":{"id":255335596,"uuid":"849200781","full_name":"muhammadrafihq/Telegram-bot-ai-gemini","owner":"muhammadrafihq","description":"Telegram bot that integrates with Google Gemini","archived":false,"fork":false,"pushed_at":"2024-08-29T08:53:19.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T06:36:39.474Z","etag":null,"topics":["chatbot","gemini","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muhammadrafihq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-29T06:52:03.000Z","updated_at":"2024-09-19T14:00:39.000Z","dependencies_parsed_at":"2024-08-29T11:17:40.331Z","dependency_job_id":"9b96ccde-42ba-43fe-a413-6fbd0fddbcd6","html_url":"https://github.com/muhammadrafihq/Telegram-bot-ai-gemini","commit_stats":null,"previous_names":["muhammadrafihq/telegram-bot-ai-gemini"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadrafihq%2FTelegram-bot-ai-gemini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadrafihq%2FTelegram-bot-ai-gemini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadrafihq%2FTelegram-bot-ai-gemini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadrafihq%2FTelegram-bot-ai-gemini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammadrafihq","download_url":"https://codeload.github.com/muhammadrafihq/Telegram-bot-ai-gemini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243382934,"owners_count":20282051,"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":["chatbot","gemini","telegram-bot"],"created_at":"2024-11-19T05:31:56.455Z","updated_at":"2025-03-13T10:18:06.530Z","avatar_url":"https://github.com/muhammadrafihq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Bot with Google Generative AI Integration\n\nThis project is a Telegram bot that integrates with Google Generative AI to process text, images messages. The bot uses the `node-telegram-bot-api` library to interact with Telegram and `@google/generative-ai` to generate AI responses.\n\n## Table of Contents\n- [Prerequisites](#prerequisites)\n- [Setup](#setup)\n- [Installation](#installation)\n- [Running the Bot](#running-the-bot)\n- [Contributing](#contributing)\n\n## Prerequisites\n\nBefore you start, make sure you have the following:\n- Node.js installed (v14 or above)\n- A Telegram bot token from the [BotFather](https://core.telegram.org/bots#botfather)\n- Google API key with access to Google Generative AI\n\n## Setup\n\n### Step 1: Create a Telegram Bot\n\n1. Open the Telegram app and search for the [BotFather](https://core.telegram.org/bots#botfather).\n2. Start a chat with BotFather and send the command `/newbot`.\n3. Follow the instructions to create your bot and receive your bot token.\n\n### Step 2: Get Google API Key\n\n1. Go to the [Google Cloud Console](https://console.cloud.google.com/).\n2. Create a new project or select an existing project.\n3. Go to the \"APIs \u0026 Services\" section and enable the \"Google Generative AI\" API.\n4. Generate an API key and note it down.\n\n### Step 3: Clone the Repository\n\nClone the repository to your local machine:\n\n\n`git clone https://github.com/your-username/telegram-bot-generative-ai.git`\n\n`cd telegram-bot-generative-ai`\n\n### Step 4: Configure Environment Variables\n\nCreate a `.env` file in the root directory of the project and add your Telegram bot token and Google API key:\n\n`.env`\n`TELEGRAM_BOT_TOKEN=your-telegram-bot-token`\n`API_KEY=your-google-api-key`\n\n\nReplace `your-telegram-bot-token` and `your-google-api-key` with the actual values you obtained from BotFather and Google.\n\n## Installation\n\n### Step 1: Install Dependencies\n\nRun the following command to install the required packages:\n\n\n`npm install`\n\n### Step 2: Install TypeScript (if not already installed)\n\nIf you're using TypeScript and it isn't already installed globally, run:\n\n`npm install -g typescript`\n\n## Running the Bot\n\n### Step 1: Compile TypeScript to JavaScript\n\nIf you're using TypeScript, compile the TypeScript files to JavaScript:\n\n\n`tsc`\n\n### Step 2: Start the Bot\n\nRun the following command to start the bot:\n\n`node dist/index.js`\n\nMake sure to replace `dist/index.js` with the actual path to your compiled JavaScript file.\n\n\n\n## Contributing\n\nFeel free to submit issues and pull requests for new features, improvements, and bug fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadrafihq%2Ftelegram-bot-ai-gemini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammadrafihq%2Ftelegram-bot-ai-gemini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadrafihq%2Ftelegram-bot-ai-gemini/lists"}