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

feat: add support for Bot API 6.6 #381

Merged
merged 9 commits into from
Mar 9, 2023
Merged

feat: add support for Bot API 6.6 #381

merged 9 commits into from
Mar 9, 2023

Conversation

KnorpelSenf
Copy link
Member

@KnorpelSenf KnorpelSenf requested a review from rojvv March 9, 2023 17:59
@KnorpelSenf
Copy link
Member Author

Main thing to review are the newly introduced method signatures on the Api class.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 3.77% and project coverage change: -0.70 ⚠️

Comparison is base (9f646bf) 35.85% compared to head (b1787bd) 35.16%.

❗ Current head b1787bd differs from pull request most recent head 2bdbfb9. Consider uploading reports for the commit 2bdbfb9 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
- Coverage   35.85%   35.16%   -0.70%     
==========================================
  Files          16       16              
  Lines        4686     4778      +92     
  Branches      166      166              
==========================================
  Hits         1680     1680              
- Misses       3004     3096      +92     
  Partials        2        2              
Impacted Files Coverage Δ
src/context.ts 23.22% <ø> (ø)
src/core/api.ts 4.53% <0.00%> (-0.38%) ⬇️
src/platform.deno.ts 84.00% <100.00%> (ø)
src/types.deno.ts 55.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rojvv
Copy link
Member

rojvv commented Mar 9, 2023

@KnorpelSenf
Copy link
Member Author

nice

Copy link
Member

@rojvv rojvv left a comment

Choose a reason for hiding this comment

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

The second parameters of the methods setCustomEmojiStickerSetThumbnail and setStickerMaskPosition are marked optional in Telegram docs, while they are required here.

@KnorpelSenf
Copy link
Member Author

KnorpelSenf commented Mar 9, 2023

They are required because if one wants to remove the thumbnail (use the first), then which code do you find more readable?

await ctx.api.setCustomEmojiStickerSetThumbnail(name)

or

await ctx.api.setCustomEmojiStickerSetThumbnail(name, "")

?

Copy link
Member

@rojvv rojvv left a comment

Choose a reason for hiding this comment

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

LGTM. All the new signatures are correct.

@KnorpelSenf KnorpelSenf merged commit b931641 into main Mar 9, 2023
@KnorpelSenf KnorpelSenf deleted the api-6.6 branch March 9, 2023 18:39
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.

3 participants