Skip to content

Commit

Permalink
[ Fixes ] InviteHashExpired
Browse files Browse the repository at this point in the history
  • Loading branch information
mrismanaziz authored Feb 20, 2022
1 parent efba3f7 commit fbc2f46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ async def start(self):

if FORCE_SUB_CHANNEL:
try:
link = await self.export_chat_invite_link(FORCE_SUB_CHANNEL)
link = (await self.get_chat(FORCE_SUB_CHANNEL)).invite_link
if not link:
await self.export_chat_invite_link(FORCE_SUB_CHANNEL)
link = (await self.get_chat(FORCE_SUB_CHANNEL)).invite_link
self.invitelink = link
except Exception as a:
self.LOGGER(__name__).warning(a)
Expand Down

0 comments on commit fbc2f46

Please sign in to comment.