Skip to content

EPSIBordeaux/Telegram_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram_Bot

Projet EPSI - Chatbot

CircleCI License: MIT codecov JavaScript Style Guide https://telegram.me/EPSI_UsainBot GitHub release

Talk to the bot

https://telegram.me/EPSI_UsainBot

Installation

npm install
cp .env.sample .env
vim .env
# Fill TOKEN variable.

Linter

This project use StandardJS as linter with a pre-commit hook.

To configure text editor, see this link.

To run linter : npm run lint

To run linter with auto-fix : npm run lint:fix

Create a bot

Talk to @BotFather

Run

Tests

npm test

Bot (local development)

It is recommended to have a separate test bot account from your production bot so that you don't get 2 answers each time you talk to the bot.

npm start

Production

Set WEBHOOK_URL and run application with production environment.

Then, you'll need a reverse proxy (such as nginx or caddy for example) to proxy request from WEBOOK_URL to your application.