Arduino UNO R4 wifi not connecting to telegram

Hello.
I am struggling with my current project and I'd appreciate some help. I'm quite new to Arduino programming and this is all new to me. I have also found it hard to find relevant information regarding the Arduino board since it's apparently quite new...
I have an R4 wifi, a PIR motion sensor and a flame sensor. I'm trying to get notified via a Telegram bot when the sensors detect a motion or a flame.

This is my code:

#include "WiFiS3.h"
#include <Arduino_JSON.h>
#include "arduino_secrets.h"
#include <UniversalTelegramBot.h>
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID;  // your network SSID (name)
char pass[] = SECRET_PASS;  // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;           // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;

WiFiClient client;
// Telegram Bot details

UniversalTelegramBot bot(BOTtoken, client);

const int flameSensorPin = A3;  // Flame sensor connected to analog pin A3
const int pirSensorPin = 2;    // PIR sensor connected to digital pin 2

void setup() {
  Serial.begin(9600);
  // Initialize WiFiS3
  WiFi.begin(ssid, pass);
  while (status != WL_CONNECTED) {
    Serial.println("Connecting to WiFi...");
    status = WiFi.begin(ssid, pass);
  }

  Serial.println("Connected to WiFi");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
  Serial.print("BOTtoken: ");
  Serial.println(BOTtoken);
  Serial.print("CHAT_ID: ");
  Serial.println(CHAT_ID);
  bot.sendMessage(CHAT_ID, "Bot started up", "");
}


void loop() {
 // Read values from sensors
  int flameSensorValue = analogRead(flameSensorPin);
  int pirSensorValue = digitalRead(pirSensorPin);

  // Check if the flame sensor detects something
  if (flameSensorValue < 100) {
    Serial.println("Flame detected!");
    bot.sendMessage(CHAT_ID, "Flame detected!!", "");
  }

  // Check if the PIR sensor detects motion
  if (pirSensorValue == HIGH) {
    Serial.println("Motion detected!");
    bot.sendMessage(CHAT_ID, "Motion detected!!", "");
  }
  delay(1000); // Adjust the delay based on your requirements
}

Everything except for the Telegram part runs fine - It connects to a wifi and I'm able to ping the local IP it shows and see the module in my router settings. When I light a flame next to the flame detector it prints out "Flame detected!" like it should but I never get notifications on Telegram.

Any help would be appreciated!

Look at this bug report: Retrieving time · Issue #337 · witnessmenow/Universal-Arduino-Telegram-Bot · GitHub

This solved my problem... but the why I do not know yet.

Did you get it to work?

No, I switched to ESP32 and got it to work on it.

It works fine if you include the time retrieval as in the example on github.

Thank you, I'm pretty new to all of this and don't know how to do it.

It's been interesting setting up my UNO R4 WiFi-Modulino with the programming and knowledge resources of MS Copilot AI... I've got some training & interests in this field but couldn't have achieved what AI brought into effort... my knowledgeable and skilled Copilot AI assistant & I are just beginning the "no connection" troubleshooting process... The "view" copilot App assistant version that ties in with the Arduino IDE didn't seem as helpful as the standard Copilot - wow, learning & achieving a lot of success with mostly time & effort... & AI. thanks for sharing