getChatMenuButton method

Future<MenuButton> getChatMenuButton(
  1. int? chatId
)

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.

Returns MenuButton on success.

https://core.telegram.org/bots/api#getchatmenubutton

Implementation

Future<MenuButton> getChatMenuButton(int? chatId) async {
  var requestUrl = _apiUri('getChatMenuButton');
  var body = <String, dynamic>{
    'chat_id': chatId,
  };
  return MenuButton.fromJson(
      await HttpClient.httpPost(requestUrl, body: body));
}