Skip to content

Commit

Permalink
feat: add --show-session option
Browse files Browse the repository at this point in the history
Show Telegram login credentials. Use this option to obtain Telegram
login credentials.
  • Loading branch information
malokhvii-eduard committed Oct 25, 2022
1 parent 2d0804f commit 32c6aa2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions raid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ def main(
" row with column names."
),
),
show_session: bool = typer.Option(
False,
"--show-session",
help=(
"Show Telegram login credentials. Use this option to obtain Telegram login"
" credentials."
),
),
) -> None:
"""
A simple tool to get immediate notifications in Slack once your Ukrainian
Expand Down Expand Up @@ -192,8 +200,8 @@ def main(
StringSession(session), api_id, api_hash, auto_reconnect=True
)
with client:
if session is None:
print(f"\n{client.session.save()}")
if show_session:
print(f"\nSession:\n\n{client.session.save()}\n")

logger.info("client.connected", api_id=api_id, chat_id=chat_id)

Expand Down

0 comments on commit 32c6aa2

Please sign in to comment.