tgsnake
Version:
Telegram MTProto framework for nodejs.
13 lines (12 loc) • 632 B
TypeScript
import { Conversation } from './conversation.js';
import type { Raw } from '../platform.node.js';
import type { Combine, NextFn } from '../Context/Composer.js';
import { type TypeUpdate, type ContextUpdate, Update } from '../TL/Updates/index.js';
export declare class ConversationManager<T> {
protected conversation: Map<bigint, Conversation<T>>;
constructor();
middleware(): (context: Combine<Combine<Combine<TypeUpdate, ContextUpdate>, Raw.TypeUpdates>, T>, next: NextFn) => any;
create(peer: bigint): Conversation<T>;
remove(peer: bigint): boolean;
static getPeerId(update: Update): bigint | undefined;
}