This is a sample Telegram bot built using Nest.js and the node-telegram-bot-api package, which allows you to interact with the Telegram Bot API. The bot uses OpenAI to generate responses to user inputs.
- Node.js v10 or higher
- A Telegram bot token, which can be obtained from the BotFather
- An OpenAI API key, which can be obtained from the OpenAI website
- Clone the repository:
git clone https://github.com/Amalreji111/chatgpt-telegram-bot.git
- Install the dependencies:
npm install
- Create a
.env
file in the root directory and add the following environment variables:TELEGRAM_API_KEY=YOUR_BOT_TOKEN OPENAI_API_KEY=YOUR_API_KEY
- Start the bot:
nest start
- Start a conversation with your bot on Telegram
- Respond to user inputs using OpenAI
- Nest.js - A progressive Node.js framework for building efficient and scalable server-side applications.