This project is a Telegram bot built with Node.js, TypeScript, and Express.js, using AI21 for AI functionalities. Follow the instructions below to set up and run the bot.
First, clone the repository to your local machine:
git clone https://github.com/UlviParviz/telegram-ai-bot.git
cd telegram-ai-bot
Install the necessary dependencies using npm:
npm install
Create a .env
file in the root of your project directory and add the following environment variables:
TELEGRAM_BOT_TOKEN=
AI21_API_KEY=
BOT_NAME=
- TELEGRAM_BOT_TOKEN: Obtain this token from BotFather on Telegram after creating a new bot.
- AI21_API_KEY: Get your API key by registering on AI21.
Run the application using the following command:
npm start
After starting the application, you can interact with your bot on Telegram. Search for the bot you created with BotFather and start chatting with it.