mirror of
https://github.com/SrIzan10/starters.git
synced 2026-05-01 11:05:16 +00:00
31 lines
861 B
Markdown
31 lines
861 B
Markdown
---
|
|
title: Telegram Bot
|
|
description: An ExpressJS server with a Telegram bot
|
|
tags:
|
|
- express
|
|
- telegraf
|
|
- typescript
|
|
---
|
|
|
|
# Telegram bot example
|
|
|
|
This example starts a [Telegram](https://telegram.org/) bot on an [ExpressJS](https://expressjs.com/) server.
|
|
|
|
[](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Frailwayapp%2Fexamples%2Ftree%2Fmaster%2Fexamples%2Ftelegram-bot&envs=TELEGRAM_BOT_TOKEN)
|
|
|
|
## ✨ Features
|
|
|
|
- Telegraf (library to interact with the Telegram bot API)
|
|
- Express
|
|
- TypeScript
|
|
|
|
## 💁♀️ How to use
|
|
|
|
- Install dependencies `yarn`
|
|
- Connect to your Railway project `railway link`
|
|
- Start the development server `railway run yarn dev`
|
|
|
|
## 📝 Notes
|
|
|
|
The server started launches a Telegram bot with a couple of basic commands. The code is located at `src/index.ts`.
|