code: async def get_url(self):
          
          if self.type == ChatType.PRIVATE:
              return f"tg://user?id={self.id}"
  
          if self.username:
              return f'https://t.me/{self.username}'
  
          if self.invite_link:
              return self.invite_link
  
          await self.update_chat()
          return self.invite_link
docs: Use this method to get chat link.
          Private chat returns user link.
          Other chat types return either username link (if they are public) or invite link (if they are private).
          :return: link
          :rtype: :obj:`base.String`