with open("dm.txt", "r", encoding="utf-8") as f: text = random.choice(f.read().splitlines()) text_area.send_keys(text.format(username = user.strip(), random = random.randint(100000, 999999)))