@@ -61,22 +61,29 @@ def async_func(*args, **kwargs):
61
61
class Dispatcher :
62
62
"""
63
63
This class dispatches all kinds of updates to its registered handlers.
64
+ A handler is a function that usually takes the following parameters
64
65
65
- A handler is a function that usually takes the following parameters:
66
- bot: The telegram.Bot instance that received the message
67
- update: The update that should be handled by the handler
66
+ bot:
67
+ The telegram.Bot instance that received the message
68
+ update:
69
+ The update that should be handled by the handler
68
70
69
- Error handlers take an additional parameter:
70
- error: The TelegramError instance that was raised during processing the
71
+ Error handlers take an additional parameter
72
+
73
+ error:
74
+ The TelegramError instance that was raised during processing the
71
75
update
72
76
73
77
All handlers, except error handlers, can also request more information by
74
78
appending one or more of the following arguments in their argument list for
75
- convenience:
76
- update_queue: The Queue instance which contains all new updates and is
79
+ convenience
80
+
81
+ update_queue:
82
+ The Queue instance which contains all new updates and is
77
83
processed by the Dispatcher. Be careful with this - you might
78
84
create an infinite loop.
79
- args: If the update is an instance str or telegram.Update, this will be
85
+ args:
86
+ If the update is an instance str or telegram.Update, this will be
80
87
a list that contains the content of the message split on spaces,
81
88
except the first word (usually the command).
82
89
Example: '/add item1 item2 item3' -> ['item1', 'item2', 'item3']
0 commit comments