Add update bot statistics code to main api