Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #18 from RedRoundRobin/feature/envVariables
Browse files Browse the repository at this point in the history
Feature/env variables
  • Loading branch information
aletomm committed Mar 26, 2020
2 parents 54f2f9f + 6c675e6 commit 1ae4b32
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ jobs:
- name: Check project formatter and linter for tests
run: npm run prettier-eslint-test-check
- name: Run project build
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
run: npm run build --if-present
- name: Run project test
run: npm test
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CI: true
- name: Run Coveralls report
uses: coverallsapp/github-action@master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ coverage/
Icon

Icon

.env
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,20 @@
![Repository Checker](https://github.com/RedRoundRobin/swe-telegram/workflows/Repository%20Checker/badge.svg)

[![Coverage Status](https://coveralls.io/repos/github/RedRoundRobin/swe-telegram/badge.svg?branch=develop)](https://coveralls.io/github/RedRoundRobin/swe-telegram?branch=develop)



Link:
t.me/ThiReMaBot

Comandi:
info - Comandi supportati
login - Autenticazione al sistema ThiReMa
status - Controllo dello status dell'utente


Istruzioni per avviarlo:
- installare node
- entrare nella cartella con il terminale
- $ npm install
- $ node bot
19 changes: 0 additions & 19 deletions ThiReMaBot.txt

This file was deleted.

8 changes: 6 additions & 2 deletions bot.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
require("dotenv").config();
// Comandi telegram bot
const Telegraf = require("telegraf");
// Richieste http
const axios = require("axios");
// Tokenbot e creazione bot
const tokenBot = "1120382460:AAG2TTBT-GqHcIfGzH_TYOvCZFI0pMEu88c";

// tokenbot e creazione bot
const tokenBot = process.env.BOT_TOKEN;
console.log(tokenBot);

const bot = new Telegraf(tokenBot);
// Richiesta per creazione server
const http = require("http");
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"license": "ISC",
"dependencies": {
"axios": "^0.19.2",
"dotenv": "^8.2.0",
"nodemon": "^2.0.2",
"telegraf": "^3.36.0"
},
Expand Down

0 comments on commit 1ae4b32

Please sign in to comment.