You've discovered a view-logger
You weren't supposed to click it, it is used on Discord and Guilded to know when someone sees the message with the view-logger.
If the person that sent this view-logger is a scripter, they might have logged your IP address.