exit()

exit([code])

Immediately stops the whole bot and exits the process with code.

— [code] (Number)

Optional exit code that the process should return. 0 by default.

nick.exit() // All is well
nick.exit(1) // Something went horribly wrong