Tolerancy for personal commands, restart supported

This commit is contained in:
MatMasIt 2021-08-19 22:44:46 +02:00 committed by GitHub
parent 7bd492a33b
commit 1be0ba2d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1279,8 +1279,13 @@ switch ($DATA["message"]["chat"]["id"]) {
goto beg; goto beg;
break; break;
case "end": case "end":
$t=preg_replace("/[^A-Za-z0-9]/", '', $t);
$t=mb_strtolower($t);
$t=trim($t);
switch ($t) { switch ($t) {
case "start":
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["thanks"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
break;
case "secret": case "secret":
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["writeYourSecret"], "reply_to_message_id" => $DATA["message"]["message_id"]]); API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["writeYourSecret"], "reply_to_message_id" => $DATA["message"]["message_id"]]);