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

@ -147,7 +147,7 @@ class Methods(Helper):
"""
Helper for Telegram API Methods listed on https://core.telegram.org/bots/api
List is updated to Bot API 4.1
List is updated to Bot API 4.2
"""
mode = HelperMode.lowerCamelCase
@ -174,6 +174,7 @@ class Methods(Helper):
STOP_MESSAGE_LIVE_LOCATION = Item() # stopMessageLiveLocation
SEND_VENUE = Item() # sendVenue
SEND_CONTACT = Item() # sendContact
SEND_POLL = Item() # sendPoll
SEND_CHAT_ACTION = Item() # sendChatAction
GET_USER_PROFILE_PHOTOS = Item() # getUserProfilePhotos
GET_FILE = Item() # getFile
@ -202,6 +203,7 @@ class Methods(Helper):
EDIT_MESSAGE_CAPTION = Item() # editMessageCaption
EDIT_MESSAGE_MEDIA = Item() # editMessageMedia
EDIT_MESSAGE_REPLY_MARKUP = Item() # editMessageReplyMarkup
STOP_POLL = Item() # stopPoll
DELETE_MESSAGE = Item() # deleteMessage
# Stickers
@ -229,10 +231,6 @@ class Methods(Helper):
SET_GAME_SCORE = Item() # setGameScore
GET_GAME_HIGH_SCORES = Item() # getGameHighScores
# Polls
SEND_POLL = Item()
STOP_POLL = Item()
@staticmethod
def api_url(token, method):
"""

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