<?php
class AskJoinInline extends Intent
{
function init()
{
$this->name = "askjoininline";
}
function act()
{
$text = $this->data['inline_query']['query'];
$this->getIS()->getTG()->apiRequest("sendMessage", array(
'chat_id' => $this->data['inline_query']['from']['id'],
"text" => "برای استفاده از لغتنامه از شما خواهشمندیم در این کانال loghatnameh عضو شوید، تا بتوانیم اطلاعات بیشتر را در اختیار شما قرار بدهیم"
. PHP_EOL . "https://t.me/loghatkad" . PHP_EOL
));
$cacheTime = 300;
$readyResult = [[
"type" => "article",
"id" => "0",
"title" => $text . " باید عضو کانال باشید تا بتونین ترجمه کنید",
"message_text" => "برای استفاده از لغتنامه از شما خواهشمندیم در این کانال عضو شوید، تا بتوانیم اطلاعات بیشتر را در اختیار شما قرار بدهیم"
. PHP_EOL . "https://t.me/loghatkad" . PHP_EOL
]];
$this->getIS()->getTG()->apiRequest("answerInlineQuery", array(
'inline_query_id' => $this->getIS()->getTG()->inline_message_id,
'results' => $readyResult,
'cache_time' => $cacheTime,
"parse_mode" => "html",
));
}
}