Custom hooks: how to know if a build is manually triggered

Using custom build and push hooks. Would like to be able to add commands if a build is manually triggered (from the trigger button in the builds tab). Is there something like an environment variable available I can use to determine if the build was triggered manually versus via a git push?