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: simplify using Test DC #509

Merged
merged 3 commits into from
Dec 24, 2023
Merged

feat: simplify using Test DC #509

merged 3 commits into from
Dec 24, 2023

Conversation

KnorpelSenf
Copy link
Member

@KnorpelSenf KnorpelSenf commented Dec 24, 2023

Requested in https://t.me/grammyjs/190672

Use it like so:

const bot = new Bot("token", {
    client: { environment: "test" },
});

Copy link
Contributor

@Loskir Loskir left a comment

Choose a reason for hiding this comment

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

Maybe rename dc to environment? Data center is a different entity
This update is also not backwards compatible for those who use buildUrl

Copy link

codecov bot commented Dec 24, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (4f730f1) 46.33% compared to head (ac9f31c) 46.33%.

Files Patch % Lines
src/core/client.ts 50.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
- Coverage   46.33%   46.33%   -0.01%     
==========================================
  Files          19       19              
  Lines        5659     5672      +13     
  Branches      227      228       +1     
==========================================
+ Hits         2622     2628       +6     
- Misses       3034     3041       +7     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KnorpelSenf
Copy link
Member Author

Maybe rename dc to environment?

Hmm yes that's a better name, let me rename it.

This update is also not backwards compatible for those who use buildUrl

That is not correct, you can always omit the parameter when specifying a function. () => "" is assignable to (a: number, b: number, c: number) => string.

@KnorpelSenf KnorpelSenf requested a review from Loskir December 24, 2023 12:20
@KnorpelSenf KnorpelSenf merged commit f1b77a8 into main Dec 24, 2023
8 checks passed
@KnorpelSenf KnorpelSenf deleted the test-dc branch December 24, 2023 12:28
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