Script] Can you check whether a player has executed a command?

pi
1

Hi. How can I check if a player has executed an order? In Minecraft script.

something like: if player has send command "/ [command]":

set [var] to 1

Ay

In my opinion you can only see it in the console or you can install a plugin if you have a server.