How to check if comments are paginated?

Just some additional info for the main comment query:

Since you mentioned the global $wp_query object, we can see that it stores:

$wp_query->max_num_comment_pages = $comment_query->max_num_pages;

in the main comment query in the comments template.

There exists a wrapper for this, namely:

get_comment_pages_count(); 

that’s available after the main comment query.

If we need it before the main comment query runs, then we might check if
get_comments_number( $post_id ) is greater than get_option( 'comments_per_page' ). But we should keep in mind that the comments_per_page parameter can be modified through e.g. the comments_template_query_args filter.

error code: 523