witnessmenow / Universal-Arduino-Telegram-Bot

Use Telegram on your Arduino (ESP8266 or Wifi-101 boards)
MIT License
1.09k stars 302 forks source link

load BOT_TOKEN #221

Closed workpage2 closed 3 years ago

workpage2 commented 3 years ago

I load the BOT_TOKEN value from the eeprom into the setup of my sketch. But I have to set the BOT_TOKEN value BEFORE executing the program. How can I set BOT_TOKEN in the program itself or change it?

#define BOT_TOKEN "XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
WiFiClientSecure secured_client;
UniversalTelegramBot bot(BOT_TOKEN, secured_client);
witnessmenow commented 3 years ago

There is an update token method

https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/blob/master/src/UniversalTelegramBot.h#L71

On Sun 24 Jan 2021, 13:42 Vladimir, notifications@github.com wrote:

I load the BOT_TOKEN value from the eeprom into the setup of my sketch. But I have to set the BOT_TOKEN value BEFORE executing the program. How can I set BOT_TOKEN in the program itself or change it?

define BOT_TOKEN "XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

WiFiClientSecure secured_client; UniversalTelegramBot bot(BOT_TOKEN, secured_client);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/issues/221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5PQS5WPN3OHFLI26USRLS3QPUVANCNFSM4WQRMSNA .