From 3ecb7cef3b3d171e1773a0997877246f1cbba58b Mon Sep 17 00:00:00 2001 From: HolidayMan <37782099+HolidayMan@users.noreply.github.com> Date: Thu, 27 Feb 2020 00:59:21 +0200 Subject: [PATCH] Some clarification of custom listeners working --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2d96d5..ef23ba7 100644 --- a/README.md +++ b/README.md @@ -466,7 +466,10 @@ The TeleBot constructor takes the following optional arguments: TeleBot should execute message handlers on it's polling Thread. ### The listener mechanism -As an alternative to the message handlers, one can also register a function as a listener to TeleBot. Example: +As an alternative to the message handlers, one can also register a function as a listener to TeleBot. + +NOTICE: handlers won't disappear! Your message will be processed both by handlers and listeners. Also, it's impossible to predict which will work at first because of threading. If you use threaded=False, custom listeners will work earlier, after them handlers will be called. +Example: ```python def handle_messages(messages): for message in messages: