From da4dddbcf709998d20c5e645b766d3b3983d18c9 Mon Sep 17 00:00:00 2001 From: Anatoly Bogomolov Date: Fri, 12 Apr 2024 20:19:39 +1000 Subject: [PATCH] fixes --- paper/client.py | 2 +- paper/parser.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paper/client.py b/paper/client.py index 0b4a4a7..bcf2b0a 100644 --- a/paper/client.py +++ b/paper/client.py @@ -66,7 +66,7 @@ class PaperClient(TelegramClient): except (PeerFloodError, FloodWaitError) as e: raise FloodException(e) - except (UserChannelsTooMuchError, UsersTooMuchError, UserIsBlockedError, YouBlockedUserError, UserKickedError, UsernameInvalidError) as e: + except (UserChannelsTooMuchError, UsersTooMuchError, UserIsBlockedError, YouBlockedUserError, ValueError, UserKickedError, UsernameInvalidError) as e: raise IgnoreException(e) @logger.catch(reraise=True) diff --git a/paper/parser.py b/paper/parser.py index def584e..272e70a 100644 --- a/paper/parser.py +++ b/paper/parser.py @@ -25,8 +25,8 @@ class PaperParser: for user in users: try: if task.is_aborted(): - return self.users_to_delete - + return + await self.client.invite_user(user, group) except (UserPrivacyException, IgnoreException): @@ -50,7 +50,7 @@ class PaperParser: for user in users: try: if task.is_aborted(): - return self.users_to_delete + return await self.client.send_message(user, message, file)