Bot flag fix and minor flag edit support

Hi! I'd like to contribute fixes for bot flag (in its current state it just breaks all possible API queries, starting with login) and implementation of minor edit flag support.