Parse a config and return a SeshetBot instance. After, the bot can be run
    simply by calling .connect() and then .start()
    
    Optional arguments:
        config_file - valid file path or ConfigParser instance
        
        If config_file is None, will read default config defined in this module.

def build_bot(config_file=None):
    """Parse a config and return a SeshetBot instance. After, the bot can be run
    simply by calling .connect() and then .start()
    
    Optional arguments:
        config_file - valid file path or ConfigParser instance
        
        If config_file is None, will read default config defined in this module.
    """
    
    from . import bot

    config = ConfigParser(interpolation=None)
    if config_file is None:
        config.read_string(default_config)
    elif isinstance(config_file, ConfigParser):
        config = config_file
    else:
        config.read(config_file)
    
    # shorter names
    db_conf = config['database']
    conn_conf = config['connection']
    client_conf = config['client']
    log_conf = config['logging']
    verbosity = config['debug']['verbosity'].lower() or 'notset'
    debug_file = config['debug']['file'] or None
    # add more as they're used

    if db_conf.getboolean('use_db'):
        db = DAL(db_conf['db_string'])
        build_db_tables(db)
        log_file = None
        log_fmts = {}
    else:
        db = None
        log_file = log_conf.pop('file')
        log_fmts = dict(log_conf)
        
    # debug logging
    debug_lvls = {'notset': 0,
                  'debug': 10,
                  'info': 20,
                  'warning': 30,
                  'error': 40,
                  'critical': 50,
                  }
    lvl = int(debug_lvls[verbosity])
    
    seshetbot = bot.SeshetBot(client_conf['nickname'], db, debug_file, lvl)

    # connection info for connect()
    seshetbot.default_host = conn_conf['server']
    seshetbot.default_port = int(conn_conf['port'])
    seshetbot.default_channel = conn_conf['channels'].split(',')
    seshetbot.default_use_ssl = conn_conf.getboolean('ssl')

    # client info
    seshetbot.user = client_conf['user']
    seshetbot.real_name = client_conf['realname']

    # logging info
    seshetbot.log_file = log_file
    seshetbot.log_formats = log_fmts
    seshetbot.locale = dict(config['locale'])
    
    return seshetbot