You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I submit a vote using the bot and the first person votes, I get the following error. looks like a bug?
the session in the bot is configured and works in all cases, except for this
The text was updated successfully, but these errors were encountered:
This is not a bug in grammY. You are trying to access the session data while processing the update about the poll. However, session data is stored per chat. Poll updates do not reveal which chat they originate from. They only give you the poll identifier. This is because polls can be shared across chats and they display the same results everywhere.
Long story short: you cannot access the session data while handling that update, and that is what the error is trying to tell you—at least not with the default session key resolver. You can fix the error by either
not accessing ctx.session for that update, or
specifying getSessionKey for the session plugin and passing a function that can load and store session data in the case that the chat is not known, i.e. ctx.chat === undefined.
when I submit a vote using the bot and the first person votes, I get the following error. looks like a bug?
the session in the bot is configured and works in all cases, except for this
The text was updated successfully, but these errors were encountered: