is there a way to link to an event that pops when bot is forced to shutdown? for instance if i'm connected to somewhere to let a script clean up things and disconnect prior to close.
The answer depends entirely on how/why the bot is forced to shutdown. For example, a kill -9 <pid> from the bot's shell is immediate and would not allow time to execute code.
Generally, the EVNT bind is used to trigger Tcl code with a number of available types associated with shutdown (see tcl-commands.html in your bot installation).
I think I have the correct numeric kill signals. It is not clear in tcl-commands.html
I have never used these EVNT bind types, so I am not aware to what extent they would allow execution of Tcl before shutdown, neither am I aware of the shutdown type resulting from say the command .die in the partyline. Terminate nicely I would hope.
I can only suggest you experiment with them. Sorry I can't be of any further assistance.