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

Allow all Context implicit params to be overrideable in extra #1953

Open
MKRhere opened this issue Feb 21, 2024 · 0 comments
Open

Allow all Context implicit params to be overrideable in extra #1953

MKRhere opened this issue Feb 21, 2024 · 0 comments
Labels

Comments

@MKRhere
Copy link
Member

MKRhere commented Feb 21, 2024

Instead of switching between ctx and ctx.telegram/bot.telegram methods, it may be beneficial and fluent to only use Context methods. In v5, all Context methods must allow their implicit params to be overridden by extra.

Example:

// use current chat
await ctx.sendMessage("Hello!");

// send message to another chat
await ctx.sendMessage("Hello!", { chat_id: -100xxxxxxxxx });

This feels more intuitive. This is a tracking issue for v5.

This proposal does not remove or endanger {bot|ctx}.telegram, it's purely additive.

@MKRhere MKRhere added the v5 label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant