Skip to content

Commit 555401c

Browse files
committed
Fix docs and indentation
1 parent 5255028 commit 555401c

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

botogram/objects/chats.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ def __init__(self, user, chat):
307307
else:
308308
self._user = user
309309
infouser = self._api.call("getChatMember", {
310-
"chat_id": self._chatid,
311-
"user_id": self._user},
310+
"chat_id": self._chatid,
311+
"user_id": self._user},
312312
expect=ChatMember)
313313

314314
try:
@@ -350,9 +350,9 @@ def __exit__(self, exc_type, exc_val, exc_tb):
350350

351351
def save(self):
352352
arguments = {
353-
"chat_id": self.chatid,
354-
"user_id": self.user
355-
}
353+
"chat_id": self.chatid,
354+
"user_id": self.user
355+
}
356356
modify = False
357357

358358
if isinstance(self.until_date, dt):
@@ -365,13 +365,16 @@ def save(self):
365365
arguments.update({"can_send_messages": self.send_messages})
366366
modify = True
367367
if self._send_media_messages != self.send_media_messages:
368-
arguments.update({"can_send_media_messages": self.send_media_messages})
368+
arguments.update({"can_send_media_messages":
369+
self.send_media_messages})
369370
modify = True
370371
if self._send_other_messages != self.send_other_messages:
371-
arguments.update({"can_send_other_messages": self.send_other_messages})
372+
arguments.update({"can_send_other_messages":
373+
self.send_other_messages})
372374
modify = True
373375
if self._add_web_page_previews != self.add_web_page_previews:
374-
arguments.update({"can_add_web_page_previews": self.add_web_page_previews})
376+
arguments.update({"can_add_web_page_previews":
377+
self.add_web_page_previews})
375378
modify = True
376379

377380
if modify:

docs/api/bot.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,11 @@ components.
460460
:param object extra: An extra reply interface object to attach.
461461

462462
.. versionadded:: 0.3
463+
.. versionchanged:: 0.6
463464

464-
.. py:method:: edit_caption(caption, [extra=None])
465+
Added support for attach
466+
467+
.. py:method:: edit_caption(caption, [attach=None, extra=None])
465468
466469
With this method you can edit the caption of the media attached to a
467470
message the user already received. This allows you to do a lot of
@@ -471,10 +474,15 @@ components.
471474
Please remember you can only edit messages your bot sent to the user.
472475

473476
:param str caption: The new caption of the media file.
477+
:param object attach: An extra thing to attach to the message.
474478
:param object extra: An extra reply interface object to attach.
475479

476480
.. versionadded:: 0.3
477481

482+
.. versionchanged:: 0.6
483+
484+
Added support for attach
485+
478486
.. py:method:: chat(id)
479487
480488
Get the :py:class:`~botogram.Chat` object of the chat with the ID you

docs/api/telegram.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ about its business.
7575
7676
is_bot indicates if the user is a bot. due to the telegram privacy rules,
7777
this can be true only when your bot can actually see other bots' messages.
78-
79-
80-
8178
.. versionadded:: 0.2
8279

8380
.. py:attribute:: avatar
@@ -510,36 +507,42 @@ about its business.
510507
This attribute is True if all the members of the group are administrator.
511508

512509
*This attribute can be None if it's not provided by Telegram.*
510+
.. versionadded:: 0.6
513511

514512
.. py:attribute:: description
515513
516514
The group/channel description
517515

518516
*This attribute can be None if it's not provided by Telegram.*
517+
.. versionadded:: 0.6
519518

520519
.. py:attribute:: invite_link
521520
522521
This group chat/channel invite link.
523522

524523
*This attribute can be None if it's not provided by Telegram.*
524+
.. versionadded:: 0.6
525525

526526
.. py:attribute:: pinned_message
527527
528528
This group/chat pinned :py:class:`~botogram.Message`
529529

530530
*This attribute can be None if it's not provided by Telegram.*
531+
.. versionadded:: 0.6
531532

532533
.. py:attribute:: sticker_set_name
533534
534535
The name of the supergroup's sticker set.
535536

536537
*This attribute can be None if it's not provided by Telegram.*
538+
.. versionadded:: 0.6
537539

538540
.. py:attribute:: can_set_sticker_set
539541
540542
This attribute is True if the bot can set this supergroup's sticker set.
541543

542544
*This attribute can be None if it's not provided by Telegram.*
545+
.. versionadded:: 0.6
543546

544547
.. py:attribute:: name
545548
@@ -793,6 +796,7 @@ about its business.
793796
:param int user: The user you want to change permissions (user ID or :py:class:`~botogram.User`)
794797
:returns: The class to edit permissions
795798
:rtype: :py:class:`~botogram.Permissions`
799+
.. versionadded:: 0.6
796800

797801
.. py:method:: send(message, [preview=True, reply_to=None, syntax=None, attach=None, extra=None, notify=True])
798802
@@ -2281,6 +2285,8 @@ about its business.
22812285

22822286
This method automatically detects the changes you made and doesn't do anything if no attribute was changed.
22832287

2288+
.. versionadded:: 0.6
2289+
22842290

22852291
.. py:class:: botogram.Venue
22862292

0 commit comments

Comments
 (0)