RomeHein / ESPecial

ESP32 automation with web interface and telegram bot
GNU General Public License v3.0
111 stars 17 forks source link

ERROR: 'struct telegramMessage' has no member named 'message_id' #2

Closed sjfaustino closed 4 years ago

sjfaustino commented 4 years ago

While trying to compile on Arduino IDE 1.8.12 for WEMOS LOLIN32 using esp32 1.0.4 on Board Manager I get a error:

TelegramHandler.cpp:140:160: error: 'struct telegramMessage' has no member named 'message_id'

         bot->sendMessageWithInlineKeyboard(bot->messages[i].chat_id, "Gpios available in output mode", "", generateInlineKeyboardsForGpios(), bot->messages[i].message_id);

My UniversalTelegramBot.h (version 1.1.0) from https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot doesn't have a struct with message_id :(

struct telegramMessage {
  String text;
  String chat_id;
  String chat_title;
  String from_id;
  String from_name;
  String date;
  String type;
  float longitude;
  float latitude;
  int update_id;
};

Did you modify the library or is there a more recent version than what I'm using?

RomeHein commented 4 years ago

Yes indeed, there is a pull request I made on that library which is still to be merged. Apparently the maintener will merge it with other features: https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/pull/155 Meanwhile, you can use the fork I've made: https://github.com/RomeHein/Universal-Arduino-Telegram-Bot That one includes the necessary changes. Also, make sure to install all the dependencies listed in the install process: https://github.com/RomeHein/ESPECIAL#installing