Set session name as key for device generation

This commit is contained in:
Анатолий Богомолов 2024-03-13 18:14:46 +10:00
parent d20062dd74
commit b23196b233
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ from telethon.errors.rpcerrorlist import (
class PaperClient(TelegramClient): class PaperClient(TelegramClient):
def __init__(self, session: str | Session) -> None: def __init__(self, session: str | Session) -> None:
api = API.TelegramAndroid.Generate("paper") api = API.TelegramAndroid.Generate(session)
super().__init__(f"sessions/{session}.session", api, flood_sleep_threshold=120) super().__init__(f"sessions/{session}.session", api, flood_sleep_threshold=120)
async def invite_self(self, group: Entity | EntityLike): async def invite_self(self, group: Entity | EntityLike):