$referenceMessageID

This variable holds the ID of the message that a user is replying to within a channel.

Explanation

When a user replies to a specific message, the $referenceMessageID function is populated with the unique identifier of that original message. If the user is not replying to a specific message (i.e., they're sending a new, independent message), this function will be empty