feat: integrate dailyStats counter into message handler
This commit is contained in:
parent
64e239b368
commit
f7bc98eaed
1 changed files with 2 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const { findDienst, getPngFilePaths } = require('./dienstService')
|
||||
const { sendTextMessage, sendImageMessage, notifyAdmin } = require('./whatsappApi')
|
||||
const { checkLimit, increment, MAX_REQUESTS_PER_DAY } = require('./rateLimiter')
|
||||
const { increment: incrementDaily } = require('./dailyStats')
|
||||
|
||||
const BOT_NAME = (process.env.BOT_NAME || 'EdGpt').toLowerCase()
|
||||
const ALLOWED_GROUP = process.env.ALLOWED_GROUP
|
||||
|
|
@ -49,6 +50,7 @@ async function handleWebhook(payload) {
|
|||
}
|
||||
|
||||
increment(author)
|
||||
incrementDaily()
|
||||
|
||||
const dienst = findDienst(dienstnummer)
|
||||
if (!dienst) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue