This project serves as a foundational framework for developing Telegram bots using Nest.js. It provides a streamlined structure and essential functionality for creating robust Telegram bots.
The purpose of this project is to offer a convenient starting point for developers who want to build Telegram bots with Nest.js. By leveraging Nest.js's powerful features and Telegram's API, developers can quickly create customized bots tailored to their specific requirements. Target
This project is intended for developers familiar with Nest.js and interested in building Telegram bots. Whether you're a beginner looking to get started or an experienced developer seeking a structured approach, this bootstrap offers the tools and guidelines necessary to kickstart your Telegram bot development journey.
Clone the project
git clone https://github.com/fariborz0015/Nest-Telegram-Bot.git
Go to the project directory
cd Nest-Telegram-Bot
Install dependencies
npm install
- Start the BotFather from this link BotFather or
@BotFather
ID in Telegram - Click
/newbot
in chat - Enter the Bot Name
- Then Enter the a uniq user name that ending with
bot
word - Copy the bot token from the botfather response
Go to the project directory in /src/config/config.ts
replace the token in
const BotToken = registerAs(Configkeys.Bot, () => ({
token: <REPLACE_TOKEN_HERE>,
}));
Start the server as deveopment
npm run start
build
npm run build
- Bot command define structure
- Bot command match Pipes
- Sample of inline button with calcback
- Sample of Reply to user message action
- Sample of Develop other service using core service to make scaleble
- Sample of fast work with
For any questions or inquiries, please reach out to the project maintainer:
Feel free to open an issue on GitHub if you encounter any problems or have suggestions for improvement.
Happy coding! 👨💻