alberti-tu / MiiBot

Telegram bot based on NodeJS and Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MiiBot

This project was generated with:

Package Version Optional
Node JS 12.16.1
Maria DB 10.1.44
Angular CLI 9.1.0

1. Installation

Installing NodeJS and NPM for Linux systems

sudo apt update -y
sudo apt upgrade -y

sudo apt install nodejs -y

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Installing MariaDB server and set execution permitions

sudo apt install mariadb-server -y
mysql --user="root" --database="mysql" --execute="update user set plugin='' where User='root'; flush privileges;"

Installing Angular CLI (optional)

sudo npm install -g @angular/cli@9.1.0

2. User interface (optional)

If you want to add a different user interface (UI) in order to manage the system, execute the following commands in a shell window after editing the folder project MiiBot-client.

cd MiiBot-client
npm install
ng build --prod

3. Configuration

Open the configuration file and set your token keys and params before start the server.

nano MiiBot-server/src/config.ts

Set the Telegram API token key on bot ➞ token.

If you don't have this number talk with Bot Father, create a bot and save its token key.

4. Start server

Install the dependences and start the program.

cd MiiBot-server
npm install
sudo npm start

About

Telegram bot based on NodeJS and Raspberry Pi


Languages

Language:TypeScript 81.5%Language:HTML 8.8%Language:SCSS 6.7%Language:JavaScript 3.0%