stopMessageLiveLocation method

Future<Message> stopMessageLiveLocation({
  1. String? inlineMessageId,
  2. ChatID? chatId,
  3. int? messageId,
  4. ReplyMarkup? replyMarkup,
})
inherited

Use this method to stop updating a live location message before live_period expires.

On success, the sent Message is returned.

Implementation

Future<Message> stopMessageLiveLocation({
  String? inlineMessageId,
  ChatID? chatId,
  int? messageId,
  ReplyMarkup? replyMarkup,
}) {
  if (inlineMessageId == null && (chatId == null || messageId == null)) {
    throw MalformedAPICallException(
      'If inlineMessageId is null then chatId and messageId must be defined',
    );
  }
  return _client.apiCall(_token, 'stopMessageLiveLocation', {
    'chat_id': chatId,
    'message_id': messageId,
    'inline_message_id': inlineMessageId,
    'reply_markup': replyMarkup
  });
}