Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@DonutByte

Description

@DonutByte
Issue body actions

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

harshil21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.