code: def link(self, text, as_html=True) -> str:
          
          try:
              url = self.url
          except TypeError:  # URL is not accessible
              if as_html:
                  return md.quote_html(text)
              return md.escape_md(text)
  
          if as_html:
              return md.hlink(text, url)
          return md.link(text, url)
docs: Generate URL for using in text messages with HTML or MD parse mode
  
          :param text: link label
          :param as_html: generate as HTML
          :return: str