Skip to content

Commit

Permalink
Adding version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
nahakiole committed Sep 4, 2020
1 parent d2e91be commit 542d0c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const {Flatastic} = require('./flatastic.js')

require('dotenv').config()

var pjson = require('./package.json');


let flatastic = new Flatastic(process.env.FLATASTIC_TOKEN)

const bot = new Telegraf(process.env.BOT_TOKEN)
Expand All @@ -20,6 +23,10 @@ flatastic.getInformation(function (data) {
})


bot.hears(/version/i, (ctx) => {
ctx.replyWithHTML( pjson.version);
})

bot.hears(/einkaufsliste|ichoufe|einkaufen|kaufen|shopping/i, (ctx) => {
flatastic.getShoppingList(function (data) {
var output = "";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telegram-flatastic-bot",
"version": "0.0.1",
"version": "0.0.2",
"description": "A telegram bot for flatastic",
"main": "bot.js",
"dependencies": {
Expand Down

0 comments on commit 542d0c8

Please sign in to comment.