Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

addcaption,parse_mode,caption_entities,disable_web_page_preview parameters toBot._send_message#3385

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 7 commits intomasterfromcaption-params-for-send-message-3372
Nov 26, 2022

Conversation

lemontree210
Copy link
Member

@lemontree210lemontree210 commentedNov 24, 2022
edited
Loading

closes#3372

Not sure I need to add tests (I think in this case I just needed to make sure existing tests don't fail).

@lemontree210lemontree210 added the 🛠 refactorchange type: refactor labelNov 24, 2022
@lemontree210lemontree210 self-assigned thisNov 24, 2022
closes#3372add doctstring and move comment there
@lemontree210lemontree210 added enhancement and removed 🛠 refactorchange type: refactor labelsNov 24, 2022
Copy link
Member

@harshil21harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

copy_message andedit_message_caption still have those if clauses left to remove.

@lemontree210
Copy link
MemberAuthor

copy_message andedit_message_caption still have those if clauses left to remove.

Yes, I agree onedit_message_caption(), butcopy_message() callsBot._post(), notBot._send_message(), so not sure this change is applicable forcopy_message()

harshil21 reacted with thumbs up emoji

@lemontree210
Copy link
MemberAuthor

BTW a (maybe too) philosophical question. Can the fact that the generic._send_message() method knows about other methods having parameters such as.caption (which pertain not to any message but to a specific type of message) be considered as breaking LoD? Maybe it's OK in this context because all of these params are part of official Telegram API.

@Bibo-Joshi
Copy link
Member

fact that the generic._send_message() method knows about other methods having parameters such as.caption

IMO this is not the case._send_message just offers that parameter, but it doesn't really know if any other method actually uses it.

lemontree210 reacted with thumbs up emoji

change all methods except for `.copy_message()`,which doesn't call `._send_message()`
@lemontree210
Copy link
MemberAuthor

Addedparse_mode as mentioned inthis comment for#3372

@lemontree210lemontree210 changed the titlerefactor: addcaption,caption_entities parameters toBot._send_messagerefactor: addcaption,parse_mode,caption_entities parameters toBot._send_messageNov 25, 2022
@lemontree210lemontree210 changed the titlerefactor: addcaption,parse_mode,caption_entities parameters toBot._send_messageaddcaption,parse_mode,caption_entities parameters toBot._send_messageNov 25, 2022
@lemontree210lemontree210 changed the titleaddcaption,parse_mode,caption_entities parameters toBot._send_messageaddcaption,parse_mode,caption_entities,disable_web_page_preview parameters toBot._send_messageNov 25, 2022
Copy link
Member

@Bibo-JoshiBibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM except for the comment below :)

@Bibo-JoshiBibo-Joshi merged commit637cc57 intomasterNov 26, 2022
@Bibo-JoshiBibo-Joshi deleted the caption-params-for-send-message-3372 branchNovember 26, 2022 18:05
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsDec 4, 2022
@Bibo-JoshiBibo-Joshi added 🔌 enhancementpr description: enhancement and removed enhancement labelsNov 3, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Bibo-JoshiBibo-JoshiBibo-Joshi approved these changes

@harshil21harshil21harshil21 approved these changes

Assignees

@lemontree210lemontree210

Labels
🔌 enhancementpr description: enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Addcaption,caption_entities as parameters toBot._send_message
3 participants
@lemontree210@Bibo-Joshi@harshil21

[8]ページ先頭

©2009-2025 Movatter.jp