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)