first version, join and very basic death messages

This commit is contained in:
smsteel
2019-02-06 18:25:50 +03:00
parent cd361a3740
commit ac91a5325c
7 changed files with 919 additions and 30 deletions

View File

@ -1,10 +1,11 @@
import Telegraf from 'telegraf'
import express from 'express'
import { sendEvent } from './bot'
const web = express()
const bot = new Telegraf('643297173:AAGuqfZx3GhiiARwvY7AtWTTFw1T-2FiwCM')
web.get('/', (req, res) => {
bot.telegram.sendMessage('test')
web.use(express.json())
web.post('/', (req, res) => {
sendEvent(req.body)
res.send({ ok: true })
})
web.listen(3000)