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

Update frameworks.ts #663

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Update frameworks.ts #663

merged 1 commit into from
Nov 12, 2024

Conversation

BilagoNet
Copy link
Contributor

@BilagoNet BilagoNet commented Nov 12, 2024

74 | let resolveResponse;
75 | return {
76 | update: request.json(),
77 | header: request.headers.get(SECRET_HEADER) || undefined,
78 | end: () => {
79 | resolveResponse(ok());
^
TypeError: resolveResponse is not a function. (In 'resolveResponse(ok())', 'resolveResponse' is undefined)

@KnorpelSenf
Copy link
Member

Can you explain this change and why it is necessary?

@BilagoNet
Copy link
Contributor Author

Can you explain this change and why it is necessary?

bot-1 | TypeError: resolveResponse is not a function. (In 'resolveResponse(ok())', 'resolveResponse' is undefined)
bot-1 | at end (/usr/src/node_modules/grammy/out/convenience/frameworks.js:79:13)
bot-1 | at /usr/src/node_modules/grammy/out/convenience/webhook.js:52:55
bot-1 | 74 | let resolveResponse;
bot-1 | 75 | return {
bot-1 | 76 | update: request.json(),
bot-1 | 77 | header: request.headers.get(SECRET_HEADER) || undefined,
bot-1 | 78 | end: () => {
bot-1 | 79 | resolveResponse(ok());
bot-1 | ^
bot-1 | TypeError: resolveResponse is not a function. (In 'resolveResponse(ok())', 'resolveResponse' is undefined)

this problem show me, fixed with handlerReturn :)

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.

Oh damn, good catch. Thanks!

@KnorpelSenf KnorpelSenf merged commit a4b078e into grammyjs:main Nov 12, 2024
6 checks passed
@KnorpelSenf
Copy link
Member

@all-contributors add @BilagoNet for bug and code

Copy link
Contributor

@KnorpelSenf

I've put up a pull request to add @BilagoNet! 🎉

@BilagoNet
Copy link
Contributor Author

thanks :)

@KnorpelSenf
Copy link
Member

This was released as 1.31.3

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