fix /text command to work with @Botname and write texts in German
This commit is contained in:
parent
163fe83c8a
commit
5ce8d2ee3e
|
|
@ -42,10 +42,11 @@ void Telegram::handleNewMessages(int numNewMessages)
|
||||||
if (text.startsWith(cmdList[i].command))
|
if (text.startsWith(cmdList[i].command))
|
||||||
{
|
{
|
||||||
String Arguments = "";
|
String Arguments = "";
|
||||||
if (text.length() > cmdList[i].command.length() + 1)
|
auto posOfFirstSpace = text.indexOf(' ');
|
||||||
|
if ((posOfFirstSpace > 0) && (text.length() > posOfFirstSpace + 1))
|
||||||
{
|
{
|
||||||
// Arguments are on space behind the command string
|
// Arguments are on space behind the command string
|
||||||
Arguments = text.substring(cmdList[i].command.length() + 1);
|
Arguments = text.substring(posOfFirstSpace + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdList[i].functionPointer != nullptr)
|
if (cmdList[i].functionPointer != nullptr)
|
||||||
|
|
|
||||||
|
|
@ -284,9 +284,9 @@ void loop()
|
||||||
if (WiFi.status() != oldWifiStatus)
|
if (WiFi.status() != oldWifiStatus)
|
||||||
{
|
{
|
||||||
/* we freshly disconnected so tell everybody that we are offline */
|
/* we freshly disconnected so tell everybody that we are offline */
|
||||||
Text = "Wifi \"";
|
Text = "WLAN \"";
|
||||||
Text += WIFI_SSID;
|
Text += WIFI_SSID;
|
||||||
Text += "\" not connected";
|
Text += "\" nicht verbunden";
|
||||||
|
|
||||||
ArduinoOTA.end();
|
ArduinoOTA.end();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user