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

[FEATURE] warn if ConversationHandler.states has a key -1 #3834

Closed
DonutByte opened this issue Aug 10, 2023 · 2 comments
Closed

[FEATURE] warn if ConversationHandler.states has a key -1 #3834

DonutByte opened this issue Aug 10, 2023 · 2 comments

Comments

@DonutByte
Copy link

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

I have now experienced the most frustrating side effect caused by ConversationHandler.END being set to -1.
I had a CH state key which was set to -1 and my entry point returned that state.
it caused the CH to exit (-1 is also END) right after my entry point which confused me.

here is an MWE which explains it better than I can with words:
https://pastebin.com/bk8MhwiX

to reproduce:
/start
pick any button - expected to continue the conversation, but instead the bot doesn't respond

Describe the solution you'd like

I thought maybe PTB can warn if -1 is set in ConversationHandler.states so nobody else has to experience it too :)
AFAIK there's no harm doing so because setting a state key to -1 is useless, it'll never get triggered

Describe alternatives you've considered

No response

Additional context

No response

@Bibo-Joshi
Copy link
Member

I suggest to add this to #2770

@Bibo-Joshi
Copy link
Member

Added to #2770. Closing this in favor of tracking everything in #2770

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants