Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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

@DonutByte

Description

@DonutByte

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 byConversationHandler.END being set to -1.
I had aCH state key which was set to -1 and my entry point returned that state.
it caused theCH to exit (-1 is alsoEND) 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 inConversationHandler.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

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp