mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-31 16:40:37 +01:00
Add live_period
param to editMessageLiveLocation
method
This commit is contained in:
parent
d388aa08e8
commit
f2e96d808c
2 changed files with 8 additions and 1 deletions
|
@ -1375,6 +1375,11 @@ Schema(
|
|||
ty: f64,
|
||||
descr: Doc(md: "Longitude of new location"),
|
||||
),
|
||||
Param(
|
||||
name: "live_period",
|
||||
ty: Option(RawTy("LivePeriod")),
|
||||
descr: Doc(md: "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF 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 remains unchanged"),
|
||||
),
|
||||
Param(
|
||||
name: "horizontal_accuracy",
|
||||
ty: Option(f64),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Message, MessageId, Recipient, ReplyMarkup};
|
||||
use crate::types::{LivePeriod, Message, MessageId, Recipient, ReplyMarkup};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to [`StopMessageLiveLocation`]. On success, the edited Message is returned.
|
||||
|
@ -24,6 +24,8 @@ impl_payload! {
|
|||
pub longitude: f64,
|
||||
}
|
||||
optional {
|
||||
/// New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF 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 remains unchanged
|
||||
pub live_period: LivePeriod,
|
||||
/// The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
pub horizontal_accuracy: f64,
|
||||
/// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
|
||||
|
|
Loading…
Reference in a new issue