Compilation error for the NodeMCU 1.0 (ESP-12E Module)

Hello everyone, I will create a project about notification via telegram bot. But I can't upload the sketch. Returns an error message.
And other sketches are loaded besides this one .
Telegram sketches:

#include <TelegramCertificate.h>
#include <UniversalTelegramBot.h>

#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>

const char* ssid = "";
const char* password = "";

#define BOTtoken ""
#define CHAT_ID ""

#define Sensor D0


WiFiClientSecure client;
X509List cert(TELEGRAM_CERTIFICATE_ROOT);
UniversalTelegramBot bot(BOTtoken, client);


void setup() {
  Serial.begin(115200);
  configTime(0, 0, "pool.ntp.org");      // get UTC time via NTP
  client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org
  pinMode(Sensor, INPUT);
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  int a = 0;
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
    a++;
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
  delay(500);
  bot.sendMessage(CHAT_ID, "System started", "");
  delay(1000);

}
void loop() {
  bool value = digitalRead(Sensor);
  Serial.println(value);
  if (value == 1) {
    Serial.println("Motion Detected");
    bot.sendMessage(CHAT_ID, "Motion detected!!", "");
  }
}

Error

In file included from C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/UniversalTelegramBot.h:31,
                 from C:\Users\ACER\AppData\Local\Temp\arduino_modified_sketch_670407\sketch_nov20a.ino:2:
C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/TelegramCertificate.h:9:12: error: redefinition of 'const char TELEGRAM_CERTIFICATE_ROOT []'
    9 | const char TELEGRAM_CERTIFICATE_ROOT[] = R"=EOF=(
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\ACER\AppData\Local\Temp\arduino_modified_sketch_670407\sketch_nov20a.ino:1:
C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/TelegramCertificate.h:9:12: note: 'const char TELEGRAM_CERTIFICATE_ROOT [1369]' previously defined here
    9 | const char TELEGRAM_CERTIFICATE_ROOT[] = R"=EOF=(
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error for the NodeMCU 1.0 (ESP-12E Module).

try to comment this line

You have a compiler error, not an upload error. Hence your topic has been moved to a more suitable location on the forum.

The TelegramCertificate.h file is included by the library, and unfortunately they neglected to put header guards in that file to prevent it being included more than once.

Thanks! I commented on this line. This already gives another error. What should I do next?
This sketch works for the author.

Post the current sketch and the error message - I am not getting any errors here after correcting for the #include.

//#include <TelegramCertificate.h>
#include <UniversalTelegramBot.h>

#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>

const char* ssid = "";
const char* password = "";

#define BOTtoken ""
#define CHAT_ID ""

#define Sensor D0


WiFiClientSecure client;
//X509List cert(TELEGRAM_CERTIFICATE_ROOT);
UniversalTelegramBot bot(BOTtoken, client);


void setup() {
  Serial.begin(115200);
  configTime(0, 0, "pool.ntp.org");      // get UTC time via NTP
  client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org
  pinMode(Sensor, INPUT);
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  int a = 0;
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
    a++;
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
  delay(500);
  bot.sendMessage(CHAT_ID, "System started", "");
  delay(1000);

}
void loop() {
  bool value = digitalRead(Sensor);
  Serial.println(value);
  if (value == 1) {
    Serial.println("Motion Detected");
    bot.sendMessage(CHAT_ID, "Motion detected!!", "");
  }
}

ERROR

In file included from C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/UniversalTelegramBot.h:31,
                 from C:\Users\ACER\Desktop\wifi\wifi.ino:2:
C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/TelegramCertificate.h:9:12: error: redefinition of 'const char TELEGRAM_CERTIFICATE_ROOT []'
    9 | const char TELEGRAM_CERTIFICATE_ROOT[] = R"=EOF=(
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\ACER\Desktop\wifi\wifi.ino:1:
C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master\src/TelegramCertificate.h:9:12: note: 'const char TELEGRAM_CERTIFICATE_ROOT [1369]' previously defined here
    9 | const char TELEGRAM_CERTIFICATE_ROOT[] = R"=EOF=(
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\ACER\Desktop\wifi\wifi.ino: In function 'void setup()':
wifi:24:27: error: 'cert' was not declared in this scope; did you mean 'cbrt'?
   24 |   client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org
      |                           ^~~~
      |                           cbrt
exit status 1
'cert' was not declared in this scope; did you mean 'cbrt'?

You wrote that you commented out the line

Did, re-issues this error

sketch_nov21a:17:15: error: 'TELEGRAM_CERTIFICATE_ROOT' was not declared in this scope
   17 | X509List cert(TELEGRAM_CERTIFICATE_ROOT);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~
Several libraries found for "UniversalTelegramBot.h"
Is used: C:\Users\ACER\Documents\Arduino\libraries\UniversalTelegramBot
Not used: C:\Users\ACER\Documents\Arduino\libraries\Universal-Arduino-Telegram-Bot-master
exit status 1
'TELEGRAM_CERTIFICATE_ROOT' was not declared in this scope

Where did you get the UniversalTelegramBot library? TELEGRAM_CERTIFICATE_ROOT is declared in that library, in the file TelegramCertificate.h, so it should not give an error. Did you modify any of the library files???

I downloaded it from this author and didn't change anything
I also downloaded the board manager inside arduino

Why have you commented out the declaration of cert?