chore: update public repo

This commit is contained in:
desu-bot 2025-01-14 02:38:00 +00:00
parent e0109980c0
commit e7c9507247
No known key found for this signature in database
25 changed files with 5364 additions and 0 deletions

11
utils/telegram.ts Normal file
View file

@ -0,0 +1,11 @@
import { TelegramClient, type TelegramClientOptions } from '@mtcute/node'
import { getEnv } from './misc.ts'
export function createTg(session: string, extra?: Partial<TelegramClientOptions>) {
return new TelegramClient({
apiId: getEnv('TELEGRAM_API_ID', Number),
apiHash: getEnv('TELEGRAM_API_HASH'),
storage: `assets/${session}.session`,
...extra,
})
}