Small changes

This commit is contained in:
Alex RootJunior 2019-04-16 00:22:22 +03:00
parent fe7735b96d
commit 71c49fd08b
2 changed files with 6 additions and 9 deletions

View file

@ -1585,15 +1585,14 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
async def delete_message(self, chat_id: typing.Union[base.Integer, base.String],
message_id: base.Integer) -> base.Boolean:
"""
Use this method to delete a message, including service messages, with the following limitations
Use this method to delete a message, including service messages, with the following limitations:
- A message can only be deleted if it was sent less than 48 hours ago.
- Bots can delete outgoing messages in groups and supergroups.
- Bots can delete outgoing messages in private chats, groups, and supergroups.
- Bots can delete incoming messages in private chats.
- Bots granted can_post_messages permissions can delete outgoing messages in channels.
- If the bot is an administrator of a group, it can delete any message there.
- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
The following methods and objects allow your bot to handle stickers and sticker sets.
Source: https://core.telegram.org/bots/api#deletemessage
:param chat_id: Unique identifier for the target chat or username of the target channel