Multiplayer: check if peer ID exists

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bush2Tree

Hey all,

How can I go about checking if an integer corresponds to a connected peer?

There doesn’t seem to be any function or list for checking that here:

Any help is appreciated.

:bust_in_silhouette: Reply From: Legorel
if peer_id in get_tree().get_network_connected_peers():
    # your code