public function s_spookyzalgoperson()
 {
     $zalgo = new Zalgo(NULL);
     $out = $zalgo->speak($this->Message->text);
     $no1 = $zalgo->speak(">not understanding spookyzalgoperson");
     $no2 = $zalgo->speak(">still not understanding spookyzalgoperson");
     if ($this->Message->Chat->type == ChatType::Group) {
         Telegram::talk($this->Message->Chat->id, $no1);
     } elseif (strlen($this->Message->text) == 0) {
         Telegram::talk($this->Message->Chat->id, $no2);
     } else {
         Telegram::talk('-19315940', person($out, false));
     }
 }
Example #2
0
 private function parseQuery()
 {
     $out = "";
     $tmp = array_reverse(explode(" ", $this->query));
     foreach ($tmp as $word) {
         $out .= " " . $word;
     }
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 1), 'title' => 'backwards', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $out = "*" . $this->from->getName() . "* " . $this->query;
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 2), 'title' => 'me', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $out = Zalgo::speak($this->query);
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 3), 'title' => 'zalgo', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $out = "*" . $this->query . "*";
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 4), 'title' => 'bold', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $out = "_" . $this->query . "_";
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 5), 'title' => 'italic', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $word = strlen($this->query) > 100 ? substr($this->query, 100) : $this->query;
     $out = '';
     foreach (str_split($this->query) as $char) {
         $index = mt_rand(0, 3);
         if ($index == 0) {
             $out .= "`{$char}` ";
         } elseif ($index == 1) {
             $out .= "{$char} ";
         } elseif ($index == 2) {
             $out .= "*{$char}* ";
         } elseif ($index == 3) {
             $out .= "_" . $char . "_ ";
         }
     }
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 6), 'title' => 'oi wut', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $word = strlen($this->query) > 10 ? substr($this->query, 10) : $this->query;
     $word = strtoupper($word);
     $out = implode(' ', str_split($word));
     foreach (str_split(substr($word, 1)) as $char) {
         $out .= "\n{$char}";
     }
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 7), 'title' => 'L O N D O N', 'input_message_content' => ['message_text' => "*{$out}*", 'parse_mode' => 'markdown']);
     $Translate = new Translate();
     $lang = $Translate->detectLanguage($this->query);
     if ($lang != 'English') {
         $translation = $Translate->translate($this->query, 'English');
         $out = "_(" . $translation['lang_source'] . ")_* " . $this->query . "*" . "\n" . "_(English)_* " . $translation['result'][0] . "*";
     } else {
         $out = $this->query;
     }
     $this->results[] = array('type' => 'article', 'id' => strval(intval($this->id) + 8), 'title' => 'translate to english', 'input_message_content' => ['message_text' => $out, 'parse_mode' => 'markdown']);
     $file = \GroupBot\Brains\Speak::createAudioFile($this->query);
     $this->results[] = array('type' => 'voice', 'id' => strval(intval($this->id) + 9), 'title' => 'vocalise with hts', 'voice_url' => "https://www.drinkwatchprogram.com/bot/speech/{$file}");
     $file = \GroupBot\Brains\Speak::createAudioFile($this->query, 'espeak');
     $this->results[] = array('type' => 'voice', 'id' => strval(intval($this->id) + 10), 'title' => 'vocalise with espeak', 'voice_url' => "https://www.drinkwatchprogram.com/bot/speech/{$file}");
 }
Example #3
0
 public function q_zalgoperson()
 {
     $zalgo = new Zalgo(NULL);
     $out = $zalgo->speak($this->Message->text);
     Telegram::talk($this->Message->Chat->id, person($out, false));
 }
Example #4
0
 public function q_zalgomax()
 {
     $zalgo = new Zalgo('max');
     $out = $zalgo->speak($this->Message->text);
     Telegram::talk($this->Message->Chat->id, $out);
 }