Fixes #1576
This commit is contained in:
Bibo-Joshi 2019-10-27 00:04:48 +02:00 committed by Noam Meltzer
parent 93449443b2
commit bbcff96804
2 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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):