Ejemplo n.º 1
0
 public function processMessage()
 {
     if ($this->greetUser()) {
         return true;
     }
     if (!$this->Message->Chat->no_spam_mode && $this->dictMatch($this->dict->interjections, $this->dict->interjections_exclusions)) {
         return true;
     }
     if ($this->dictMatch($this->dict->interjection_commands, $this->dict->interjections_exclusions, true)) {
         return true;
     }
     if (!$this->Message->isNormalMessage()) {
         $this->processChannelChange();
     }
     if ($this->sed()) {
         return true;
     }
     if ($this->isBotMentioned()) {
         if ($this->dictCommand($this->dict->reply_commands)) {
             return true;
         }
         if ($this->dictUsers($this->dict->user_replies)) {
             return true;
         }
         if ($this->dictMatch($this->dict->replies)) {
             return true;
         }
         if (count(mb_split(" ", $this->Message->text)) < 6) {
             Telegram::reply($this->Message->Chat->id, $this->Message->message_id, $this->dict->default_reply);
             return true;
         }
     }
     $this->translate();
     return true;
 }