UNPKG

@wasserstoff/mangi-tg-bot

Version:

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

25 lines 938 B
import { Api, Context } from "grammy"; import { Update, UserFromGetMe, Chat, User } from "@grammyjs/types"; import { SessionData } from "../middlewares/session"; import { Logger } from "../../logger"; type ExtendedContextFlavor = { logger: Logger; }; export type CustomContext = Omit<Context, 'chat' | 'from' | 'session'> & { chat: Chat; from: User; session: SessionData & { save?: (callback: (err?: any) => void) => void; setCustom: (key: string, value: any) => void; getCustom: (key: string) => any; updateCustom: (updates: Record<string, any>) => void; deleteCustom: (key: string) => void; }; __sessionKey?: string; config?: any; } & ExtendedContextFlavor; export declare const createContextConstructor: ({ logger }: { logger: Logger; }) => new (update: Update, api: Api, me: UserFromGetMe) => CustomContext; export {}; //# sourceMappingURL=CustomContext.d.ts.map