Prevent main loop from executing if this file is imported from another module
Cleaned up main loop; reduced to 1 try-except block
Replaced already_done with a more reliable alternative
Prevent bot from posting same definitions twice in a thread