Create a Telegram Bot with node
Tags: telegram, bot, javascript, typescript
Published: 2021-04-06 08:30:56

---
title: Create a Telegram Bot with node
published: true
description: 🤖 Create telegram bot with this friendly nodejs boilerplate
tags: telegram, bot, javascript, typescript
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jp8as5ds1rqslyce72hv.png
---

# 🤖 node-telegram-bot-boilerplate

Create your telegram bot with this friendly boilerplate. Use this repository as template for your bot

[https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate)

## 📎 Menu

-   💡 [Features](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate#-features)
-   🚀 [How to use](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate#-usage-deploy)
-   🔨 [Developer Mode](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate#-developer-mode)
-   -   🏁 [Run Project](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate#-run-project)
-   -   💾 [Setup Project](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate#-setup-project)

## 💡 Features

-   [✔️] Easy to use
-   [✔️] MIT License
-   [✔️] Make telegram bot with node
-   [✔️] Friendly boilerplate + Github templates
-   [✔️] Typescript + TSPaths preconfigured
-   [✔️] Userfriendly folders tree
-   [✔️] Prettiers and ESLint preconfigured
-   [✔️] all-contributors-cli and all-shields-cli preconfigured
-   [✔️] JEST Test preconfigured
-   [✔️] Full async code
-   [✔️] Github and Vscode dotfiles preconfigured
-   [✔️] Translations: 🇬🇧 🇮🇹 🇵🇱 (Help me ❤️)

## 🚀 Usage

1. Clone this repository or download [nightly](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/nightly.zip), [beta](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/beta.zip) or [stable](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/main.zip).
2. Write to [@botfather](https://t.me/botfather) on telegram and create new bot (save token and set bot username)
3. Run with correct values: `npm run init:token --username name_bot --token 1234:asdfghjkl`
4. Run `npm run init`
5. Run `npm run start-pm2`

## 🔨 Developer Mode

#### 🏁 Run Project

1. Clone this repository or download [nightly](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/nightly.zip), [beta](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/beta.zip) or [stable](https://github.com/ptkdev-boilerplate/node-telegram-bot-boilerplate/archive/main.zip).
2. Write to [@botfather](https://t.me/botfather) on telegram and create new bot (save token and set bot username)
3. Run with correct values: `npm run init:token --username name_bot --token 1234:asdfghjkl`
4. Run `npm run init`
5. Run `npm run dev`

#### 💾 Setup Project

If you want replace all strings (example: package name, author, urls, etc...) in markdown file, source files and others files of this project you need edit `setup.json` with correct values and run `npm run setup`.


## 💫 License

-   Code and Contributions have **MIT License**
-   Images and logos have **CC BY-NC 4.0 License**
-   Documentations and Translations have **CC BY 4.0 License**

###### Copyleft (c) 2021 [Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://twitter.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>