Added consent
This commit is contained in:
parent
d7db2f36d4
commit
b494eecc21
|
@ -559,8 +559,7 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
];
|
||||
if ($l[1] == "n") {
|
||||
$url = $list[$l[2] - 1] ?: $list[array_rand($list)];
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$url = $list[array_rand($list)];
|
||||
}
|
||||
API("sendChatAction", ["chat_id" => $DATA["message"]["chat"]["id"], "action" => "upload_photo"]);
|
||||
|
@ -574,9 +573,7 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
}
|
||||
API("sendChatAction", ["chat_id" => $DATA["message"]["chat"]["id"], "action" => "upload_photo"]);
|
||||
API("sendPhoto", ["chat_id" => $DATA["message"]["chat"]["id"], "photo" => "https://api.apiflash.com/v1/urltoimage?access_key=9f4b8514390e45c3aff7350c635587a8&url=http%3A%2F%2Fwebport.altervista.org%2Fbots%2Ftelegram%2Flgbt%2Feva.php%3Fdata%3D" . urlencode(json_encode($list)) . "&height=478&width=600", "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
|
||||
}
|
||||
elseif ($t == ".joke") {
|
||||
} elseif ($t == ".joke") {
|
||||
|
||||
if (!moduleOn(".joke", $DATA["message"]["chat"]["id"], $DATA, true)) break;
|
||||
$do = json_decode(file_get_contents($GLOBALS["config"]["lgbt"]["APIs"]["jokes"]), true);
|
||||
|
@ -782,9 +779,7 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
} while (empty(trim($list[$i])));
|
||||
}
|
||||
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => trim($list[$i]), "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
}
|
||||
|
||||
elseif ($t == ".NLG" || explode(" ", $t)[0] == ".NLG") {
|
||||
} elseif ($t == ".NLG" || explode(" ", $t)[0] == ".NLG") {
|
||||
|
||||
if (!moduleOn(".NLG", $DATA["message"]["chat"]["id"], $DATA, true)) break;
|
||||
$a = explode(" ", $t);
|
||||
|
@ -797,9 +792,7 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
} while (empty(trim($list[$i])));
|
||||
}
|
||||
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => trim($list[$i]), "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
}
|
||||
|
||||
elseif ($t == ".nr" || explode(" ", $t)[0] == ".nr") {
|
||||
} elseif ($t == ".nr" || explode(" ", $t)[0] == ".nr") {
|
||||
|
||||
if (!moduleOn(".nr", $DATA["message"]["chat"]["id"], $DATA, true)) break;
|
||||
$a = explode(" ", $t);
|
||||
|
@ -812,9 +805,7 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
} while (empty(trim($list[$i])));
|
||||
}
|
||||
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => "The Nazi oracle says:\n" . trim($list[$i]), "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
}
|
||||
|
||||
elseif ($t == ".bibbiaJuebox" || explode(" ", $t)[0] == ".bibbiaJuebox") {
|
||||
} elseif ($t == ".bibbiaJuebox" || explode(" ", $t)[0] == ".bibbiaJuebox") {
|
||||
if (!moduleOn(".bibbiaJuebox", $DATA["message"]["chat"]["id"], $DATA, true)) break;
|
||||
$a = explode(" ", $t);
|
||||
$list = file("bibbia.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
|
@ -1026,9 +1017,17 @@ switch ($DATA["message"]["chat"]["id"]) {
|
|||
$u = $people->get($uid);
|
||||
switch ($u->status) {
|
||||
case "askDm":
|
||||
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => "Per procedere, occorre acconsentire alla privacy policy:\n https://telegra.ph/Rainbow-Bot----Privacy-policy-08-04 \n Scrivi \"Sì\" per continuare.", "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
break;
|
||||
case "consent":
|
||||
$a = strtolower(trim($t));
|
||||
if ($a == "sì" || $a == "si" || $a == "ok" || $a == "yes") {
|
||||
askNameFirst($DATA, $u->oneEdit == "askDm");
|
||||
$u->status = "askName";
|
||||
$u->save();
|
||||
} else {
|
||||
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => "Nessun problema, scrivi \"sì\" in qualsiasi momento se hai un ripensamento", "reply_to_message_id" => $DATA["message"]["message_id"]]);
|
||||
}
|
||||
break;
|
||||
case "askName":
|
||||
if ($u->oneEdit != $u->status) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user