Tellbot Telegram Framework
This Node.js framework aims to simplify creation of Telegram bots by applying OOP, MVC approaches and concepts.
Itโs built upon:
- Telegram Bot API - http://core.telegram.org/bots/api
- NodeJS Telegram Bot API - https://github.com/yagop/node-telegram-bot-api
- Redux - https://github.com/reactjs/redux
๐ Credits to Pavel Durov, Yagop and Dan Abramov
๐จโ๐ป Developed by Danybayev Sanzhar
๐ Motivation
When I started creating my very first Telegram Bot I came across one issue - code overloading. When I finished it, it was about ~700 lines of code in one file. Which is not good at all. It was very hard to maintain it and make changes. There was no design pattern or predefined code structure (scaffolding) at all. I made a little research and found out that there's no such a framework that would allow create bots with ease and fast.
So, I decided to create it by my own.
My main goal was to create an new Abstract Layer that would simplify creation of bots by taking advantage of OOP, MVC, writing tons of helpers classes and introducing new concepts (Classes) in my framework that would drastically increase speed of development.
Here's the list of new concepts:
- Rooms
- Keys
- Topics
- Buttons
Installation
To run the bot you need to do the following steps:
- Clone the repository
git clone https://github.com/sanzhardanybayev/Tellbot
- Install all the packages
npm install
- Update config.js file with your credentials
module.exports = {
token: 'yourtoken',
name: '@yourbotname',
options: {
birth: null,
polling: true
},
backButton: 'โฉ Back'
};
- Run the app.js file
node app