from .main import main import sys, logging if( __name__ == "__main__"): logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) if(len(sys.argv) < 2): print("E: missing bot api token file") print(" usage:") print(" {} ".format(sys.argv[0])) sys.exit(1) try: f = open(sys.argv[1]) token = f.read().strip() f.close() except: print("E: failed to open and read token file") sys.exit(1) main(token)