akn-dev / akn /manage /new_start_funcs.py
randydev's picture
fix update
ecbc262
raw
history blame contribute delete
715 Bytes
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}"}
)