added some actual code for bot querying