C++ code handling main functionalities of the bot