def handle_difficulty_string(song, links):
    """
    Helper function. Returns a string that is formatted according to Discord's
    hyperlink syntax.
    :param song: song to return difficulty information of
    :param links: URL(s) containing links to view each difficulty's chart
    """
    difficulty_string = ""

    # obtain links and output in discord hyperlink format, i.e.
    # [text here](url here)
    if links[0] is not None:
        difficulty_string += f'[EASY {"".join(str(int(song.Diff_E)))}]({links[0]})'
        difficulty_string += " | "
    
    if links[1] is not None:
        difficulty_string += f'[HARD {"".join(str(int(song.Diff_H)))}]({links[1]})'
        difficulty_string += " | "
        
    difficulty_string +=  f'[CHAOS {"".join(str(int(song.Diff_C)))}]({links[2]})'

    if links[3] is not None:
        difficulty_string += " | "
        difficulty_string += f'[GLITCH {"".join(str(int(song.Diff_G)))}]({links[3]})'

    return difficulty_string