-
Notifications
You must be signed in to change notification settings - Fork 29
Description
привет всем!
не могу побороть, хочу добавить настройки телеграмм бота, есть идеи?
нашел me-no-dev/ESPAsyncWebServer#325
#include "tmbot.h"
tmbot(param("BOTname"), param("BOTmessage"), param("BOTchatid"), param("token"));
tmbot.h
#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h>
String BOTtoken, BOTname, BOTmessage, BOTchatid;
WiFiClientSecure ssl_client;
UniversalTelegramBot bot(BOTtoken, ssl_client);
void tmbot(String BOTname, String BOTmessage, String BOTchatid, String BOTtoken)
{
DEBG("BOTname is " + BOTname);
DEBG("BOTmessage is " + BOTmessage);
DEBG("BOTchatid is " + BOTchatid);
DEBG("BOTtoken is " + BOTtoken);
DEBG("Sending messages... ");
UniversalTelegramBot bot(BOTtoken, ssl_client);
String message = BOTname + "\n";
message += BOTmessage;
bot.sendMessage(BOTchatid, message, "");
}