Skip to content

Conversation

@evermake
Copy link
Collaborator

@evermake evermake commented Jul 18, 2025

See discussion at: https://t.me/grammyjs/314748

@KnorpelSenf
Copy link
Member

I don't think there is any plugin that works this way. I am not sure if we should illustrate it this way.

We can, however, add a code snippet that does

// Install an alias so we don't have to type out `.raw`:
bot.api.someMethod = (param) => bot.api.raw.someMethod(param);

and then the same inside middleware. What do you think about this?

@evermake
Copy link
Collaborator Author

evermake commented Jul 18, 2025

So the SomeContextFlavor in this case could be something like this

export type SomeContextFlavor = {
  someMethod: (...) => Promise<...>
}

right?

@evermake
Copy link
Collaborator Author

So the SomeContextFlavor in this case could be something like this

export type SomeContextFlavor = {
  someMethod: (...) => Promise<...>
}

right?

@KnorpelSenf, could you answer this, please?

@KnorpelSenf
Copy link
Member

@evermake that would be the API flavour, but yes, that structure is correct. For the context flavour, it needs to adjust ctx.api etc.

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

@github-actions github-actions bot temporarily deployed to pull request September 3, 2025 14:51 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 12, 2025 08:18 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 12, 2025 14:21 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 7, 2025 11:08 Inactive
@evermake evermake requested a review from KnorpelSenf November 8, 2025 10:30
@github-actions github-actions bot temporarily deployed to pull request November 8, 2025 10:31 Inactive
Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

Excellent stuff, thank you!

@KnorpelSenf KnorpelSenf requested a review from rojvv November 8, 2025 10:40
@evermake
Copy link
Collaborator Author

evermake commented Nov 8, 2025

@KnorpelSenf, should I update labels somehow to make CI pass?

@KnorpelSenf
Copy link
Member

Nope, we need to wait for translations. Once they're done (all language labels are added) the job will pass.

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