Add proper message when requesting to join via invite link

This commit is contained in:
Tulir Asokan
2022-03-28 15:03:04 +03:00
parent c536c4a265
commit 2b8b853fec
2 changed files with 4 additions and 1 deletions
@@ -26,6 +26,7 @@ from telethon.errors import (
EmoticonInvalidError,
InviteHashExpiredError,
InviteHashInvalidError,
InviteRequestSentError,
OptionsTooMuchError,
TakeoutInitDelayError,
UserAlreadyParticipantError,
@@ -171,6 +172,8 @@ async def _join(
return (await evt.sender.client(ImportChatInviteRequest(identifier))), None
except UserAlreadyParticipantError:
return None, await evt.reply("You are already in that chat.")
except InviteRequestSentError:
return None, await evt.reply("Invite request sent successfully.")
else:
channel = await evt.sender.client.get_entity(identifier)
if not channel: