diff --git a/telegram/_bot.py b/telegram/_bot.py index 286709de8ed..ba889ee7177 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -2611,7 +2611,9 @@ async def send_location( live_period (:obj:`int`, optional): Period in seconds for which the location will be updated, should be between :tg-const:`telegram.constants.LocationLimit.MIN_LIVE_PERIOD` and - :tg-const:`telegram.constants.LocationLimit.MAX_LIVE_PERIOD`. + :tg-const:`telegram.constants.LocationLimit.MAX_LIVE_PERIOD`, or + :tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` for live + locations that can be edited indefinitely. heading (:obj:`int`, optional): For live locations, a direction in which the user is moving, in degrees. Must be between :tg-const:`telegram.constants.LocationLimit.MIN_HEADING` and @@ -2764,8 +2766,8 @@ async def edit_message_live_location( can be updated, starting from the message send date. If :tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` is specified, then the location can be updated forever. Otherwise, the new value must not exceed - the current live_period by more than a day, and the live location expiration date - must remain within the next 90 days. If not specified, then `live_period` + the current ``live_period`` by more than a day, and the live location expiration + date must remain within the next 90 days. If not specified, then ``live_period`` remains unchanged .. versionadded:: NEXT.VERSION. diff --git a/telegram/_inline/inlinequeryresultlocation.py b/telegram/_inline/inlinequeryresultlocation.py index 0c370ee8a74..dff2b29a48b 100644 --- a/telegram/_inline/inlinequeryresultlocation.py +++ b/telegram/_inline/inlinequeryresultlocation.py @@ -89,7 +89,9 @@ class InlineQueryResultLocation(InlineQueryResult): live_period (:obj:`int`): Optional. Period in seconds for which the location will be updated, should be between :tg-const:`telegram.InlineQueryResultLocation.MIN_LIVE_PERIOD` and - :tg-const:`telegram.InlineQueryResultLocation.MAX_LIVE_PERIOD`. + :tg-const:`telegram.InlineQueryResultLocation.MAX_LIVE_PERIOD` or + :tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` for live + locations that can be edited indefinitely. heading (:obj:`int`): Optional. For live locations, a direction in which the user is moving, in degrees. Must be between :tg-const:`telegram.InlineQueryResultLocation.MIN_HEADING` and diff --git a/telegram/_inline/inputlocationmessagecontent.py b/telegram/_inline/inputlocationmessagecontent.py index 22cb2d9ef62..d9642c485c5 100644 --- a/telegram/_inline/inputlocationmessagecontent.py +++ b/telegram/_inline/inputlocationmessagecontent.py @@ -42,7 +42,9 @@ class InputLocationMessageContent(InputMessageContent): live_period (:obj:`int`, optional): Period in seconds for which the location will be updated, should be between :tg-const:`telegram.InputLocationMessageContent.MIN_LIVE_PERIOD` and - :tg-const:`telegram.InputLocationMessageContent.MAX_LIVE_PERIOD`. + :tg-const:`telegram.InputLocationMessageContent.MAX_LIVE_PERIOD` or + :tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` for live + locations that can be edited indefinitely. heading (:obj:`int`, optional): For live locations, a direction in which the user is moving, in degrees. Must be between :tg-const:`telegram.InputLocationMessageContent.MIN_HEADING` and