Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@
# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
'preamble': '''\\setcounter{tocdepth}{2}
\\usepackage{enumitem}
\\setlistdepth{99}''',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Contents:
telegram

.. toctree::
:maxdepth: 2
telegram



Expand Down
7 changes: 0 additions & 7 deletions docs/source/modules.rst

This file was deleted.

17 changes: 17 additions & 0 deletions docs/source/telegram.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
telegram.contrib package
========================

Submodules
----------

.. toctree::

telegram.contrib.botan

Module contents
---------------

.. automodule:: telegram.contrib
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/telegram.ext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Submodules
telegram.ext.dispatcher
telegram.ext.jobqueue
telegram.ext.handler
telegram.ext.callbackqueryhandler
telegram.ext.choseninlineresulthandler
telegram.ext.conversationhandler
telegram.ext.commandhandler
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinekeyboardbutton.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinekeyboardbutton module
===========================
====================================

.. automodule:: telegram.inlinekeyboardbutton
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinekeyboardmarkup.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinekeyboardmarkup module
==========================
====================================

.. automodule:: telegram.inlinekeyboardmarkup
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultarticle.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultarticle module
=================================
========================================

.. automodule:: telegram.inlinequeryresultarticle
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultaudio.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultaudio module
=================================
======================================

.. automodule:: telegram.inlinequeryresultaudio
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedaudio.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedaudio module
=================================
============================================

.. automodule:: telegram.inlinequeryresultcachedaudio
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcacheddocument.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcacheddocument module
=================================
===============================================

.. automodule:: telegram.inlinequeryresultcacheddocument
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedgif.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedgif module
=================================
==========================================

.. automodule:: telegram.inlinequeryresultcachedgif
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedmpeg4gif.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedmpeg4gif module
=================================
===============================================

.. automodule:: telegram.inlinequeryresultcachedmpeg4gif
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedphoto.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedphoto module
=================================
============================================

.. automodule:: telegram.inlinequeryresultcachedphoto
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedsticker.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedsticker module
=================================
==============================================

.. automodule:: telegram.inlinequeryresultcachedsticker
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedvideo.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedvideo module
=================================
============================================

.. automodule:: telegram.inlinequeryresultcachedvideo
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcachedvoice.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcachedvoice module
=================================
============================================

.. automodule:: telegram.inlinequeryresultcachedvoice
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultcontact.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultcontact module
=================================
========================================

.. automodule:: telegram.inlinequeryresultcontact
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultdocument.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultdocument module
=================================
=========================================

.. automodule:: telegram.inlinequeryresultdocument
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultgif.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultgif module
=================================
====================================

.. automodule:: telegram.inlinequeryresultgif
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultlocation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultlocation module
=================================
=========================================

.. automodule:: telegram.inlinequeryresultlocation
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultmpeg4gif.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultmpeg4gif module
=================================
=========================================

.. automodule:: telegram.inlinequeryresultmpeg4gif
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultphoto.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultphoto module
=================================
======================================

.. automodule:: telegram.inlinequeryresultphoto
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultvenue.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultvenue module
=================================
======================================

.. automodule:: telegram.inlinequeryresultvenue
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultvideo.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultvideo module
=================================
======================================

.. automodule:: telegram.inlinequeryresultvideo
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/telegram.inlinequeryresultvoice.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
telegram.inlinequeryresultvoice module
=================================
======================================

.. automodule:: telegram.inlinequeryresultvoice
:members:
Expand Down
7 changes: 0 additions & 7 deletions docs/source/telegram.nullhandler.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/source/telegram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Submodules
telegram.audio
telegram.base
telegram.bot
telegram.constants
telegram.contrib
telegram.ext
telegram.inlinequery
telegram.inlinequeryresult
Expand Down Expand Up @@ -37,14 +39,12 @@ Submodules
telegram.chataction
telegram.contact
telegram.document
telegram.emoji
telegram.error
telegram.forcereply
telegram.chat
telegram.inputfile
telegram.location
telegram.message
telegram.nullhandler
telegram.photosize
telegram.replykeyboardhide
telegram.replykeyboardmarkup
Expand Down
21 changes: 11 additions & 10 deletions telegram/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ def sendAudio(self,

Args:
chat_id: Unique identifier for the message recipient - Chat id.
audio Audio file to send. You can either pass a file_id as String to resend an audio
audio: Audio file to send. You can either pass a file_id as String to resend an audio
that is already on the Telegram servers, or upload a new audio file using
multipart/form-data.
duration (Optional[int]): Duration of sent audio in seconds.
performer: Performer of sent audio. [Optional]
title: Title of sent audio. [Optional]
caption: Audio caption [Optional]
performer (Optional[str]): Performer of sent audio.
title (Optional[str]): Title of sent audio.
caption (Optional[str]): Audio caption
disable_notification (Optional[bool]): Sends the message silently. iOS users will not
receive a notification, Android users will receive a notification with no sound.
reply_to_message_id (Optional[int]): If the message is a reply, ID of the original
Expand Down Expand Up @@ -405,8 +405,8 @@ def sendDocument(self,
chat_id: Unique identifier for the message recipient - Chat id.
document: File to send. You can either pass a file_id as String to resend a file that
is already on the Telegram servers, or upload a new file using multipart/form-data.
filename: File name that shows in telegram message (it is usefull when you send file
generated by temp module, for example). [Optional]
filename (Optional[str]): File name that shows in telegram message (it is usefull when
you send file generated by temp module, for example).
caption (Optional[str]): Document caption (may also be used when resending documents by
file_id), 0-200 characters.
disable_notification (Optional[bool]): Sends the message silently. iOS users will not
Expand Down Expand Up @@ -554,7 +554,7 @@ def sendVoice(self,
that is already on the Telegram servers, or upload a new audio file using
multipart/form-data.
duration (Optional[int]): Duration of sent audio in seconds.
caption: Voice caption [Optional]
caption (Optional[str]): Voice caption
disable_notification (Optional[bool]): Sends the message silently. iOS users will not
receive a notification, Android users will receive a notification with no sound.
reply_to_message_id (Optional[int]): If the message is a reply, ID of the original
Expand Down Expand Up @@ -777,6 +777,7 @@ def sendChatAction(self, chat_id, action, **kwargs):
chat_id: Unique identifier for the message recipient - Chat id.
action: Type of action to broadcast. Choose one, depending on what the user is about to
receive:

- ChatAction.TYPING for text messages,
- ChatAction.UPLOAD_PHOTO for photos,
- ChatAction.UPLOAD_VIDEO for videos,
Expand Down Expand Up @@ -862,8 +863,8 @@ def getUserProfilePhotos(self, user_id, offset=None, limit=100, timeout=None, **

Args:
user_id: Unique identifier of the target user.
offset (Optional[int]: Sequential number of the first photo to be returned. By default,
all photos are returned.
offset (Optional[int]): Sequential number of the first photo to be returned. By
default, all photos are returned.
limit (Optional[int]): Limits the number of photos to be retrieved. Values between
1-100 are accepted. Defaults to 100.
timeout (Optional[float]): If this value is specified, use it as the definitive timeout
Expand Down Expand Up @@ -960,7 +961,7 @@ def unbanChatMember(self, chat_id, user_id, timeout=None, **kwargs):
Args:
chat_id: Unique identifier for the target group or username of the target supergroup
(in the format @supergroupusername).
user_id: Unique identifier of the target user.
user_id: Unique identifier of the target user.
timeout (Optional[float]): If this value is specified, use it as the definitive timeout
(in seconds) for urlopen() operations.
**kwargs (dict): Arbitrary keyword arguments.
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/callbackqueryhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CallbackQueryHandler(Handler):
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
be used to insert updates. Default is ``False``.
be used to insert updates. Default is ``False``.
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
instance created by the ``Updater`` which can be used to schedule new jobs.
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/choseninlineresulthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChosenInlineResultHandler(Handler):
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
be used to insert updates. Default is ``False``.
be used to insert updates. Default is ``False``.
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
instance created by the ``Updater`` which can be used to schedule new jobs.
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/commandhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CommandHandler(Handler):
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
be used to insert updates. Default is ``False``.
be used to insert updates. Default is ``False``.
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
instance created by the ``Updater`` which can be used to schedule new jobs.
Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def add_handler(self, handler, group=DEFAULT_GROUP):
which handlers were added to the group defines the priority.

Args:
handler (Handler): A Handler instance
handler (telegram.ext.Handler): A Handler instance
group (Optional[int]): The group identifier. Default is 0
"""

Expand All @@ -330,7 +330,7 @@ def remove_handler(self, handler, group=DEFAULT_GROUP):
Remove a handler from the specified group

Args:
handler (Handler): A Handler instance
handler (telegram.ext.Handler): A Handler instance
group (optional[object]): The group identifier. Default is 0
"""
if handler in self.handlers[group]:
Expand Down
6 changes: 3 additions & 3 deletions telegram/ext/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Handler(object):
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
be used to insert updates. Default is ``False``.
be used to insert updates. Default is ``False``.
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
instance created by the ``Updater`` which can be used to schedule new jobs.
Expand Down Expand Up @@ -85,7 +85,7 @@ def handle_update(self, update, dispatcher):

Args:
update (object): The update to be handled
dispatcher (Dispatcher): The dispatcher to collect optional args
dispatcher (telegram.ext.Dispatcher): The dispatcher to collect optional args

"""
raise NotImplementedError
Expand All @@ -96,7 +96,7 @@ def collect_optional_args(self, dispatcher, update=None):
handlers

Args:
dispatcher (Dispatcher):
dispatcher (telegram.ext.Dispatcher):
"""
optional_args = dict()

Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/inlinequeryhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class InlineQueryHandler(Handler):
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
be used to insert updates. Default is ``False``.
be used to insert updates. Default is ``False``.
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
instance created by the ``Updater`` which can be used to schedule new jobs.
Expand Down
Loading