8000 Add `show_caption_above_media` parameter to `Defaults` · Issue #4306 · python-telegram-bot/python-telegram-bot · GitHub
[go: up one dir, main page]

Skip to content

Add show_caption_above_media parameter to Defaults #4306

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

Open
Kyryh opened this issue Jun 19, 2024 · 5 comments
Open

Add show_caption_above_media parameter to Defaults #4306

Kyryh opened this issue Jun 19, 2024 · 5 comments

Comments

@Kyryh
Copy link
Kyryh commented Jun 19, 2024

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Currently when you want to set the show_caption_above_media parameter to every bot method that supports it (such as send_video, send_photo, edit_message_caption, etc.) you need to do so manually on each method call

Describe the solution you'd like

It would be nice to set a default value for it via the telegram.ext.Defaults class, since you typically set it everywhere anyway just for consistency sake

Describe alternatives you've considered

No response

Additional context

I would also like to contribute for this feature myself if that's fine

@Kyryh Kyryh changed the title [FEATURE] Add show_caption_above_media parameter to telegram.ext.Defaults [FEATURE] Add show_caption_above_media parameter to Defaults Jun 19, 2024
@Bibo-Joshi
Copy link
Member

Thanks for reaching out. I double checked the implementation of Defaults in (Ext)Bot. Defaults for explicit parameters of bot methods are relatively simple to implement (opposed to e.g. InputMedia.parse_mode or things like that), so this addition would not complicate the implementation of (Ext)Bot significantly. Still, this would not be a trivial change.

I vote +0 on this, i.e. I would accept a PR but don't see a need for the PTB dev team to work on this actively.

@python-telegram-bot/developers what do you think?

@harshil21
Copy link
Member

-0.5. We can't have all/many parameters of bot methods in Defaults. This parameter in particular is not as significant as say "disable_notification", which is in all send_* methods. Similarly, message_effect_id shouldn't be in Defaults because I don't see a use case where one would use the same effect on every message. Note that as a workaround you can still use a functools.partial anyway.

@Poolitzer
Copy link
Member

I would very much also accept a PR, I see how people would like to have this for their whole bot whenever applicable.

@Bibo-Joshi Bibo-Joshi changed the title [FEATURE] Add show_caption_above_media parameter to Defaults Add show_caption_above_media parameter to Defaults Nov 8, 2024
@tusarpatari

This comment has been minimized.

@tusarpatari

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0