forked from cepave-f2e/cepave-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
31 lines (28 loc) · 938 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Cepave AI
* @type {string}
*/
'use strict'
const express = require('express')
const server = express()
const ai = require('./ai')
const bodyParser = require('body-parser')
ai.onText(/^\/duty/, require('./commands/duty'))
ai.onText(/^\/gif (.+)/, require('./commands/gif'))
ai.onText(/^\/news/, require('./commands/news'))
ai.onText(/^\/girl/, require('./commands/girl'))
ai.onText(/^\/time/, require('./commands/time'))
ai.onText(/^\/status (.+)/, require('./commands/status'))
ai.onText(/^\/freeze (set) (.+)/, require('./commands/freeze'))
ai.onText(/^\/freeze (get)/, require('./commands/freeze'))
ai.onText(/^\/\$/, require('./commands/money'))
ai.on('message', (msg)=> {
console.log(msg)
})
server
.use(bodyParser.json())
.use(bodyParser.urlencoded({ extended: false }))
.use('/webhook', require('./hookRouter'))
.listen(17777, ()=> {
console.log('Cepave AI server was listening on port 17777')
})