Download src/models.ts from mfoud444/bot-me: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/mfoud444/bot-me/resolve/main/src/models.ts
- Command line
-
hf download hf://spaces/mfoud444/bot-me/src/models.ts
-
curl -L -o models.ts https://huggingface.co/spaces/mfoud444/bot-me/resolve/main/src/models.ts
1.08 kB
| import { TelegramClient } from "telegram"; | |
| import { NewMessage, NewMessageEvent } from "telegram/events"; | |
| export interface PendingAuth { | |
| client: TelegramClient; | |
| phoneCodeHash: string; | |
| } | |
| export interface TelegramClientInfo { | |
| client: TelegramClient; | |
| session?: string; | |
| lastActivity: Date; | |
| username: string; | |
| } | |
| export interface ActiveTask { | |
| client: TelegramClient; | |
| taskType:API.TaskType | |
| taskData:any | |
| listeners: Map< | |
| string, | |
| { | |
| handler: (event: NewMessageEvent) => void; | |
| filter: NewMessage; | |
| } | |
| >; | |
| } | |
| export interface Command { | |
| id: number; | |
| key: string; | |
| description?: string; | |
| created_at?: string; | |
| updated_at?: string; | |
| } | |
| export interface Message { | |
| id: number; | |
| command_id: number; | |
| key: string; | |
| value: string; | |
| description?: string; | |
| created_at?: string; | |
| updated_at?: string; | |
| } | |
| export const telegramClients = new Map<string, TelegramClientInfo>(); | |
| export const telegrafBots = new Map<string, any>(); | |
| export const pendingAuthRequests = new Map<string, PendingAuth>(); | |
| export const activeTasks = new Map<string, ActiveTask>(); |