This commit is contained in:
smsteel 2019-02-06 15:45:21 +03:00
parent 04fd7a82be
commit 79a65eacf6
6 changed files with 5321 additions and 7 deletions

13
.babelrc Normal file
View File

@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"targets": {
"node": true
}
}
]
]
}

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -4,10 +4,7 @@
{ {
"name": "TepexoffBot", "name": "TepexoffBot",
"restart_after_update": true, "restart_after_update": true,
"env": [ "cmd": ["npm build && npm start"]
"NODE_PATH=/usr/lib/node_modules"
],
"cmd": ["node", "main.js"]
} }
] ]
} }

10
main.js
View File

@ -1,5 +1,9 @@
const Telegraf = require('telegraf') import { Telegraf } from 'telegraf'
import express from 'express'
console.log({omg: 123}) const web = express()
const bot = new Telegraf('643297173:AAGuqfZx3GhiiARwvY7AtWTTFw1T-2FiwCM')
console.log(Telegraf) web.listen(3000, () => {
bot.telegram.sendMessage('test')
})

5271
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "tepexoffbot",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": ".\\node_modules\\.bin\\babel-node main.js",
"build": "npm install",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.omg.team/omg-team/TepexoffBot.git"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/node": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"standard": "^12.0.1"
},
"dependencies": {
"express": "^4.16.4",
"telegraf": "^3.27.1"
}
}