This is a simple Telegram-Bot based on JS and the Telegraf package.
- Fast Setup
- Custom Commands
- Basic mysql example Inclued
This Bot uses open source software:
- node.js - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
- Telegraf - Modern Telegram BotFramework for Node.js
- mysql - awesome mysql driver
- winston - awsome logger library
Requirements:
To install node v12 run the following commands:
$ sudo apt update
$ sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt -y install nodejs
Install the dependencies fast with the npm installer:
$ cd telegram-Bot
$ npm install
add your Bot-Token and if needed your Databe login in the config.mjs
to run this Bot simply use
$ node bot.mjs
It will be usefull to run this Bot via a screen session.
Want to contribute? Great! Just Create a Pull requests
- Write MORE Examples
- Add general mysql functionality
GNU GENERAL PUBLIC LICENSE v3+