You are looking at a command called darken

darken {object}
darken location


You can darken your locations by either standing in it or beside it and using the darken command.
eg:
build a cave
darken the cave

or
build a door to a kitchen
go to the door
darken location (this will darken the kitchen)

You can only darken a location you have created or is unlocked.

read the info about darkness



cowScript notes:
This sends out the trigger word 'darken' so things can react to a location being made dark.

I suggest any activity that darkens a location (say turning off a light) should send out 'darken' so objects can respond accordingly.
Code