first version, join and very basic death messages
This commit is contained in:
9
main.js
9
main.js
@ -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)
|
||||
|
Reference in New Issue
Block a user