UNPKG

@wasserstoff/mangi-tg-bot

Version:

A powerful Telegram Bot SDK with built-in authentication, session management, and database integration

19 lines 597 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUpdateInfo = getUpdateInfo; exports.logHandle = logHandle; function getUpdateInfo(ctx) { // eslint-disable-next-line camelcase, @typescript-eslint/no-unused-vars const { update_id, ...update } = ctx.update; return update; } function logHandle(id) { return (ctx, next) => { ctx.logger.info({ msg: `handle ${id}`, ...(id.startsWith("unhandled") ? { update: getUpdateInfo(ctx) } : {}), }); return next(); }; } //# sourceMappingURL=logger.js.map