Reorder exits

This commit is contained in:
Ceda EI 2018-04-02 13:51:13 +05:30
parent 30cf3ce947
commit ff72c587ac
1 changed files with 9 additions and 7 deletions

View File

@ -215,11 +215,6 @@ fwrite($json, $var);
fclose($json);
$decoded = json_decode($var);
// If message is a reply, exit
if (isset($decoded->{"message"}->{"reply_to_message"})) {
exit();
}
// Store the chat ID
$chat_id = $decoded->{"message"}->{"chat"}->{"id"};
@ -282,6 +277,10 @@ $modules = array(
)
);
if (!isset($decoded->{"message"}->{"text"})){
exit();
}
if (isset($decoded->{"message"}->{"pinned_message"})){
exit();
}
@ -294,8 +293,11 @@ foreach ($modules as $module ) {
exit();
}
}
if (!isset($decoded->{"message"}->{"text"})){
// If message is a reply, exit
if (isset($decoded->{"message"}->{"reply_to_message"})) {
exit();
}
send_text(get_insults(), true);
?>