<?php
class FaDeText extends Intent {
public $hasOtherIntents = true;
function init(){
$pattern = new Pattern("longPersianText");
$pattern->addAndRule("/[ا-ی۰-۹]{5,}/");
$pattern->addAndRule("/.{30,4000}/");
$this->patterns[] = $pattern;
}
function getIntentID(){
return 8;
}
function act(){
$message = $this->getIS()->getTG()->message;
// $this->getIS()->getTG()->sendMessage($message,$this->getIS()->getTG()->chat_id);
$this->getIS()->getTG()->getButtonService()->addKeyboardMarkup("برگردان به آلمانی",FaDeTextTranslate::$key.":tr");
$this->getIS()->getTG()->sendMarkedupMessage(
$message['text'],
$this->getIS()->getTG()->getButtonService()->getKeyboardMarkedup()
);
}
}