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

add telegram.editMessageMedia typing #1053

Merged
merged 3 commits into from
Jun 26, 2020
Merged

add telegram.editMessageMedia typing #1053

merged 3 commits into from
Jun 26, 2020

Conversation

EdJoPaTo
Copy link
Contributor

@EdJoPaTo EdJoPaTo commented Jun 2, 2020

Description

See #979

Type of change

Please delete options that are not relevant.

  • Documentation (typos, code examples or any documentation update)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Breaking Change (Typescript users only): you have to explicitly specify undefined when you want to remove the caption or markup on an existing message.
This way typescript knows this is intended and not just a forgotten argument.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

EdJoPaTo added 3 commits June 2, 2020 20:42
before all arguments could be undefined which doesnt work
fix Markup type (correct on context)

arguments can be undefined but they should be explicitly
This way you state explicitly what you want and dont forget something.
This way typescript can actually help you

BREAKING CHANGE: you have to supply undefined where you could ommit the argument before
@wojpawlik wojpawlik merged commit f5bb973 into telegraf:develop Jun 26, 2020
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 this pull request may close these issues.

2 participants