understanding commited on
Commit
83d77bb
·
verified ·
1 Parent(s): d6d7161

Create bot/client.py

Browse files
Files changed (1) hide show
  1. bot/client.py +13 -0
bot/client.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ from hydrogram import Client
3
+ from app.config import Config
4
+
5
+ def build_bot(cfg: Config) -> Client:
6
+ return Client(
7
+ name="yt_uploader_bot",
8
+ api_id=cfg.API_ID,
9
+ api_hash=cfg.API_HASH,
10
+ bot_token=cfg.BOT_TOKEN,
11
+ in_memory=True,
12
+ workers=20,
13
+ )