Skip to content
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

fix: Optional SignChat.text_of_btn_to_click #19

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

jobs:
build:
publish:
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion tg_signer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SignChat(BaseJSONConfig):
chat_id: int
sign_text: str
delete_after: Optional[int] = None
text_of_btn_to_click: str = None # 需要点击的按钮的文本
text_of_btn_to_click: Optional[str] = None # 需要点击的按钮的文本
choose_option_by_image: bool = False # 需要根据图片选择选项

@property
Expand Down
4 changes: 3 additions & 1 deletion tg_signer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ def ask_for_config(self) -> "SignConfig":
text_of_btn_to_click = None
choose_option_by_image_ = False
if has_keyboard.strip().lower() == "y":
text_of_btn_to_click = input("5. 键盘中需要点击的按钮文本: ").strip()
text_of_btn_to_click = input(
"5. 键盘中需要点击的按钮文本(无则直接回车): "
).strip()
choose_option_by_image_input = input(
"6. 是否需要通过图片识别选择选项?(y/N):"
)
Expand Down
Loading