If the command is not recognized by the game world (e.g. there is no pony present), then the command is not converted into an action. If the player's attempt to act is unsuccessful (e.g. the pony runs away) but still somehow useful (e.g. the pony will now perform some useful action in another location), a command that does not achieve its intended effect may still be considered an action.
It is considered good style for a game to give feedback to a player who has performed an incorrect action but is on the right track.