Skip to content

Commit 8f12e2c

Browse files
Update BOT Token during execution
I have included a function to update the Token during execution time so the token can be stored in (for example) the EEPROM and retrieved during setup.
1 parent b4ebcae commit 8f12e2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/UniversalTelegramBot.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ UniversalTelegramBot::UniversalTelegramBot(String token, Client &client) {
4040
this->client = &client;
4141
}
4242

43+
void UniversalTelegramBot::updateToken(String token) {
44+
_token = token;
45+
}
46+
4347
String UniversalTelegramBot::sendGetToTelegram(String command) {
4448
String mess = "";
4549
long now;

0 commit comments

Comments
 (0)