I have the code to turn off and on the relay light via Telegram and the error "Exit Status 1" appears. This is the code:
#include <CTBot.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
CTBot myBot;
const char* wifiSsid = "wifi-ahsan";
const char* wifiPassword = "anyarlali";
String token = "censored";
const int id = censored
int Relay1 = 5;
int Relay2 = 4;
void setup() {
Serial.begin(115200);
delay(10);
// Koneksi ke jaringan Wi-Fi
WiFi.begin(wifiSsid, wifiPassword);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Menghubungkan ke WiFi...");
}
Serial.println("Tersambung ke Wi-Fi");
// Inisialisasi bot Telegram
myBot.wifiConnect(wifiSsid, wifiPassword);
myBot.setTelegramToken(token);
if (myBot.testConnection()) {
Serial.println("testConnection OK");
} else {
Serial.println("testConnection NOK");
}
// Inisialisasi pin relay
pinMode(Relay1, OUTPUT);
digitalWrite(Relay1, HIGH);
pinMode(Relay2, OUTPUT);
digitalWrite(Relay2, HIGH);
}
void loop() {
TBMessage msg;
if (myBot.getNewMessage(msg)) {
if (msg.text.equalsIgnoreCase("Mulai bot")) {
myBot.sendMessage(msg.sender.id, "Silahkan Mulai");
delay(500);
}
if (msg.text.equalsIgnoreCase("Relay1 ON")) {
digitalWrite(Relay1, LOW);
myBot.sendMessage(msg.sender.id, "Lampu 1 Menyala");
} else if (msg.text.equalsIgnoreCase("Relay1 OFF")) {
digitalWrite(Relay1, HIGH);
myBot.sendMessage(msg.sender.id, "Lampu 1 Padam");
delay(500);
}
if (msg.text.equalsIgnoreCase("Relay2 ON")) {
digitalWrite(Relay2, LOW);
myBot.sendMessage(msg.sender.id, "Lampu 2 Menyala");
} else if (msg.text.equalsIgnoreCase("Relay2 OFF")) {
digitalWrite(Relay2, HIGH);
myBot.sendMessage(msg.sender.id, "Lampu 2 Padam");
delay(500);
}
if (msg.text.equalsIgnoreCase("All Relay ON")) {
digitalWrite(Relay1, LOW);
digitalWrite(Relay2, LOW);
myBot.sendMessage(msg.sender.id, "Semua Lampu Menyala");
delay(500);
}
if (msg.text.equalsIgnoreCase("All Relay OFF")) {
digitalWrite(Relay1, HIGH);
digitalWrite(Relay2, HIGH);
myBot.sendMessage(msg.sender.id, "Semua Lampu Padam");
delay(500);
}
}
}
and the error was
Any idea how to fix that, guys?


