~/wiki / s-chego-nachat / first-ai-project-with-universal-prompts

Первый проект через универсальные промпты: Telegram-бот

◷ 6 min read 1/31/2026

Main chat

A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.

$ cd section/ $ join vibe dev
Первый проект через универсальные промпты: Telegram-бот - обложка

When people start using AI for development, they often continue to work the old pattern: manually create folders, set dependencies, and write code.

But modern AI-IDE can do this automatically.

If you give the model the correct prompt, it can:

  • structure of the project
  • file
  • dependency
  • code
  • launch instructions

At the same time, the developer does a minimum of manual actions. His task is to correctly formulate the problem and check the result.

In this article, we will create the first project almost entirely through AI – a simple Telegram bot.


Why the first project is better to do Telegram bot

For the first project, it is important to choose a simple architecture.

Telegram-bot is one of the simplest types of services. It does not have a complex interface and frontend.

The logic of the bot is very simple:

Шаг Что происходит
пользователь отправляет сообщение Telegram создаёт событие
Telegram отправляет событие серверу бота
бот обрабатывает сообщение отправляет ответ

Thus, the whole system consists of only three elements:

Компонент Роль
Telegram источник сообщений
бот обработка логики
сервер запуск программы

This makes Telegram a perfect first project.


What you need before starting

For development, we need a minimum set of tools.

Инструмент Назначение
AI‑IDE (Cursor или VS Code с AI) генерация и управление кодом
Node.js запуск JavaScript программ
Telegram Bot Token доступ к API Telegram

If Node.js is installed, commands will run in the terminal:

bash
node -v
npm -v

After that, you can start the project.


Step 1. Creation of Telegram-bot

First you need to create a bot in Telegram.

Open Telegram and find:

code
@BotFather

This is the official Telegram bot for creating other bots.

Now execute the command:

code
/newbot

BotFather will ask:

  1. botname
  2. username

After that, he will issue a token.

Example of a token:

code
123456789:AAH_example_token

This token allows your app to control the bot.

Save it - you'll need it later.


Step 2. Generation of the entire project through AI

Now we're going to create the whole project through prompt.

Open AI-IDE and give the model the following request.

code
Create a Telegram-bot project.

Requirements:
- Node language. js
Node-telegram-bot-api library
- Team /start
- Team /help
Responding to normal messages

Do it automatically:
- Create a project structure
- establish dependencies
- Create a bot file. js
- add launch instructions

Modern AI-IDE can:

  • folder
  • perform npm install
  • file
  • insert

After completing the request, you will have a ready-made project structure.


Step 3. Verification of project structure

Once generated, AI typically creates a structure of roughly this kind.

Файл Назначение
bot.js основной файл бота
package.json зависимости проекта
node_modules установленные библиотеки

The bot.js file will have a bot code.

For example:

javascript
const TelegramBot = require('node-telegram-bot-api');

const token = "YOUR_TOKEN";

const bot = new TelegramBot(token, { polling: true });

bot.onText(/\/start/, (msg) => {
  bot.sendMessage(msg.chat.id, "Привет! Я тестовый бот.");
});

bot.onText(/\/help/, (msg) => {
  bot.sendMessage(msg.chat.id, "Доступные команды: /start /help");
});

bot.on('message', (msg) => {
  if (msg.text !== '/start' && msg.text !== '/help') {
    bot.sendMessage(msg.chat.id, "Я получил ваше сообщение.");
  }
});

This code can already be run.


Step 4. Adding a token

Now replace the line:

code
YOUR_TOKEN

the token you received from BotFather.

For example:

code
const token = "123456789:AAH_example_token"

Save the file.


Step 5. Launching a bot

Now we need to start the program.

At the terminal, do:

bash
node bot.js

If done correctly, the bot will start working.

Now open Telegram and send the bot:

code
/start

The bot has to answer.

This means that your first AI project is working.


Step 6. Improving the project through AI

Now we can continue to work through new prompts.

For example:

code
Add logging user messages.

or

code
Divide the bot code into multiple files.

or

code
Add a new /info command.

AI will change the project automatically.

Thus, the development turns into a cycle:

Этап Что происходит
идея формулируется задача
промпт AI генерирует код
запуск проверяется работа
улучшения система дорабатывается

Step 7. Preparation for the deplo

The bot only works on your computer.

For it to work constantly, it must be placed on the server.

Most often, platforms are used:

Платформа Назначение
Railway backend сервисы
Render серверные приложения
VPS полный контроль

The process usually looks like this:

  1. code is uploaded to Git
  2. platform connects to the repository
  3. server launches application

After that, the bot works 24/7.


What is important to understand after the first project

The main idea of development through AI is minimum manual actions.

The developer does not create folders and files manually.

He:

  • chart
  • gives a universal prompt
  • check out

AI does a routine job:

  • create a project structure
  • dependency
  • code

The developer manages the architecture.


Outcome

We went through a full development cycle through AI:

  1. created a Telegram-bot
  2. generated the project through a universal prompt
  3. launcher
  4. test

The same approach can be used to create:

  • web-application
  • API
  • automation
  • internal

The main thing is to formulate accurate prompts and check the result.


$ cd ../ ← back to Where to start