-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possibility to choose config file, implement temporary sessions #4
Conversation
Hi. I wonder how temporary sessions can be useful, you have to log-in with phone number and code every single time if you don't save them. |
@@ -74,7 +78,8 @@ class Client: | |||
INVITE_LINK_RE = re.compile(r"^(?:https?:\/\/)?t\.me\/joinchat\/(.+)$") | |||
DIALOGS_AT_ONCE = 100 | |||
|
|||
def __init__(self, session_name: str, test_mode: bool = False): | |||
def __init__(self, config_file: str = "config.ini", session_name: str = None, test_mode: bool = False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should keep session_name
as the first parameter so you don't have to explicitly pass a kwarg every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is ok for me. As you like it best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just seemed me conceptually right to have the config file first 😄
Hi! For example, when the user is logging in on a public/shared device and it is just a one-time login and he doesn't want to save any data. Edit: that is just a use-case scenario that I imagined, currently I am not using it for that, but having a default value of |
Could you guys give an example on how to use this config.ini or another solution to change |
- Added updates about a reaction change on a message with non-anonymous reactions, represented by the class MessageReactionUpdated and the field message_reaction in the class Update. - Added updates about reaction changes on a message with anonymous reactions, represented by the class MessageReactionCountUpdated and the field message_reaction_count in the class Update.
Client
, instead of using the previously hard-coded "config.ini" filesession_name
toNone
in order to make it "temporary", so that it won't be saved