From bbcff96804bc8dc40ad948dabbce264a7f83538c Mon Sep 17 00:00:00 2001 From: Bibo-Joshi Date: Sun, 27 Oct 2019 00:04:48 +0200 Subject: [PATCH] Doc fixes (#1572) Fixes #1576 --- telegram/ext/conversationhandler.py | 3 +-- telegram/ext/jobqueue.py | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/telegram/ext/conversationhandler.py b/telegram/ext/conversationhandler.py index 67da65fe4..a31809a70 100644 --- a/telegram/ext/conversationhandler.py +++ b/telegram/ext/conversationhandler.py @@ -38,8 +38,7 @@ class _ConversationTimeoutContext(object): class ConversationHandler(Handler): """ A handler to hold a conversation with a single user by managing four collections of other - handlers. Note that neither posts in Telegram Channels, nor group interactions with multiple - users are managed by instances of this class. + handlers. The first collection, a ``list`` named :attr:`entry_points`, is used to initiate the conversation, for example with a :class:`telegram.ext.CommandHandler` or diff --git a/telegram/ext/jobqueue.py b/telegram/ext/jobqueue.py index 1f513872b..d3e0edced 100644 --- a/telegram/ext/jobqueue.py +++ b/telegram/ext/jobqueue.py @@ -42,7 +42,8 @@ class JobQueue(object): Attributes: _queue (:obj:`PriorityQueue`): The queue that holds the Jobs. bot (:class:`telegram.Bot`): The bot instance that should be passed to the jobs. - DEPRECATED: Use set_dispatcher instead. + DEPRECATED: Use :attr:`set_dispatcher` instead. + """ def __init__(self, bot=None): @@ -68,6 +69,13 @@ class JobQueue(object): self._running = False def set_dispatcher(self, dispatcher): + """Set the dispatcher to be used by this JobQueue. Use this instead of passing a + :class:`telegram.Bot` to the JobQueue, which is deprecated. + + Args: + dispatcher (:class:`telegram.ext.Dispatcher`): The dispatcher. + + """ self._dispatcher = dispatcher def _put(self, job, next_t=None, last_t=None):