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
It basically binds new handler to OnMessage event and filtering the sender.id to know whether message sent from correct user.
In new versions there are no OnMessage event, the only event we can use is OnApiResponseReceived which is pretty useless and non-sense (useless thing ever) binding extra handler to this event won't work as handler won't contain anything related about message/chat.
The text was updated successfully, but these errors were encountered:
I believe that what you described is generally known as a "callback hell". This kind of application logic often results in bugs and leaks due to incorrect use of events.
In general, you should use a state machine pattern to keep track for the conversation.
Alternatively, you can use one of the frameworks, based on Telegram.Bot library.
In earlier versions (v17) waiting input from user was possible with this method.
I also made
WaitForKeyboard
event that waits for markup event.It basically binds new handler to
OnMessage
event and filtering thesender.id
to know whether message sent from correct user.In new versions there are no
OnMessage
event, the only event we can use isOnApiResponseReceived
which is pretty useless and non-sense (useless thing ever) binding extra handler to this event won't work as handler won't contain anything related about message/chat.The text was updated successfully, but these errors were encountered: