Added buffer parsing function to the bot