sr-tamim/openai-telegram-bot — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Telegram chatbot in Node.js that uses OpenAI to reply like a normal AI assistant. I want users to message the bot in Telegram, use a start command to get a friendly greeting, then chat with it and get useful responses back.
Please set it up so it can run locally with npm and also be deployed as a Netlify serverless function. Use environment variables for the Telegram bot token and OpenAI key, with an example env file so I know what to fill in.
Also add a way to limit the bot to specific Telegram groups, and make it only answer when someone replies to one of the bot’s messages, so it doesn’t spend money responding to every random message. Keep the code clean and easy for a beginner to understand. If the Telegram or OpenAI setup has changed, look up the current docs online and make it work with the latest APIs.
Want more depth? Deep Reverse