teleproto - v1.229.0
    Preparing search index...

    Function parseUsername

    • Parses the given username or channel access hash, given a string, username or URL. Returns a tuple consisting of both the stripped, lowercase username and whether it is a joinchat/ hash (in which case is not lowercase'd).

      Returns (undefined, false) if the username or link is not valid.

      Parameters

      • username: string

        {string}

      Returns { isInvite: true; username: string } | { isInvite: false; username?: string }