File size: 715 Bytes
21bc372 ecbc262 21bc372 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from akn.manage.parameter import generate_random_string
from config import API_ID, API_HASH
from pyrogram import Client
def initial_client_bots(bot_token: str, plugins: str = "AllDownloaderBot"):
client_name = generate_random_string(12)
return Client(
"{}".format(client_name),
api_id=API_ID,
api_hash=API_HASH,
bot_token=bot_token,
plugins={"root": f"akn.{plugins}"}
)
def initial_client_user(session: str, plugins: str = "Akeno"):
client_name = generate_random_string(12)
return Client(
"{}".format(client_name),
api_id=API_ID,
api_hash=API_HASH,
session_string=session,
plugins={"root": f"akn.{plugins}"}
) |