Skip to content

Commit

Permalink
fixes .env not working from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
msramalho committed Feb 8, 2024
1 parent 9ed496d commit d7f5415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "telegram-phone-number-checker"
version = "1.0.3"
version = "1.0.4"
description = "Check if phone numbers are connected to Telegram accounts."
authors = ["Bellingcat"]
license = "MIT"
Expand Down
3 changes: 1 addition & 2 deletions telegram_phone_number_checker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from getpass import getpass
import click

load_dotenv()

def get_names(client, phone_number):
"""
This function takes in a phone number and returns the username first name and the last name of the user if the user exists. It does so by first adding the user's phones to the contact list, retrieving the information, and then deleting the user from the contact list.
Expand Down Expand Up @@ -90,6 +88,7 @@ def show_results(output, res):
@click.option('--output', help='results filename, default to results.json', default="results.json", type=str)
def main_entrypoint(phone_numbers, api_id, api_hash, api_phone_number, output):
"""Check to see if one or more phone numbers belong to a valid Telegram account"""
load_dotenv()
client = login(api_id, api_hash, api_phone_number)
res = validate_users(client, phone_numbers)
show_results(output, res)
Expand Down

0 comments on commit d7f5415

Please sign in to comment.