mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 23:38:26 +01:00
Update content of files
This commit is contained in:
parent
9516041b9c
commit
1ca8fa1f8d
3 changed files with 151 additions and 552 deletions
|
@ -1,287 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hellobot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="This sample PHP bot demonstrates the basics of the Telegram Bot API.
|
||||
If you have questions, try our FAQ or check out this…">
|
||||
<meta property="og:title" content="Hellobot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="This sample PHP bot demonstrates the basics of the Telegram Bot API.
|
||||
If you have questions, try our FAQ or check out this…">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
||||
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body class="preload">
|
||||
<div class="dev_page_wrap">
|
||||
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clearfix">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="//telegram.org/">Home</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
||||
<li class=""><a href="/api">API</a></li>
|
||||
<li class=""><a href="/mtproto">Protocol</a></li>
|
||||
<li class=""><a href="/schema">Schema</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container clearfix">
|
||||
<div class="dev_page">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/bots" >Telegram Bots</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/bots/samples" >Code Examples</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/bots/samples%2Fhellobot" >Hellobot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Hellobot</h1>
|
||||
|
||||
<div id="dev_page_content"><blockquote>
|
||||
<p>This sample PHP bot demonstrates the basics of the <a href="/bots/api">Telegram Bot API</a>.<br>If you have questions, try our <a href="/bots/faq">FAQ</a> or check out <a href="/bots/samples">this page</a> for more examples.</p>
|
||||
</blockquote>
|
||||
<div><br></div>
|
||||
|
||||
<pre><code><?php
|
||||
|
||||
define('BOT_TOKEN', '12345678:replace-me-with-real-token');
|
||||
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
|
||||
|
||||
function apiRequestWebhook($method, $parameters) {
|
||||
if (!is_string($method)) {
|
||||
error_log("Method name must be a string\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$parameters) {
|
||||
$parameters = array();
|
||||
} else if (!is_array($parameters)) {
|
||||
error_log("Parameters must be an array\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
$parameters["method"] = $method;
|
||||
|
||||
$payload = json_encode($parameters);
|
||||
header('Content-Type: application/json');
|
||||
header('Content-Length: '.strlen($payload));
|
||||
echo $payload;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function exec_curl_request($handle) {
|
||||
$response = curl_exec($handle);
|
||||
|
||||
if ($response === false) {
|
||||
$errno = curl_errno($handle);
|
||||
$error = curl_error($handle);
|
||||
error_log("Curl returned error $errno: $error\n");
|
||||
curl_close($handle);
|
||||
return false;
|
||||
}
|
||||
|
||||
$http_code = intval(curl_getinfo($handle, CURLINFO_HTTP_CODE));
|
||||
curl_close($handle);
|
||||
|
||||
if ($http_code >= 500) {
|
||||
// do not wat to DDOS server if something goes wrong
|
||||
sleep(10);
|
||||
return false;
|
||||
} else if ($http_code != 200) {
|
||||
$response = json_decode($response, true);
|
||||
error_log("Request has failed with error {$response['error_code']}: {$response['description']}\n");
|
||||
if ($http_code == 401) {
|
||||
throw new Exception('Invalid access token provided');
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
$response = json_decode($response, true);
|
||||
if (isset($response['description'])) {
|
||||
error_log("Request was successful: {$response['description']}\n");
|
||||
}
|
||||
$response = $response['result'];
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
function apiRequest($method, $parameters) {
|
||||
if (!is_string($method)) {
|
||||
error_log("Method name must be a string\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$parameters) {
|
||||
$parameters = array();
|
||||
} else if (!is_array($parameters)) {
|
||||
error_log("Parameters must be an array\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($parameters as $key => &$val) {
|
||||
// encoding to JSON array parameters, for example reply_markup
|
||||
if (!is_numeric($val) && !is_string($val)) {
|
||||
$val = json_encode($val);
|
||||
}
|
||||
}
|
||||
$url = API_URL.$method.'?'.http_build_query($parameters);
|
||||
|
||||
$handle = curl_init($url);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($handle, CURLOPT_TIMEOUT, 60);
|
||||
|
||||
return exec_curl_request($handle);
|
||||
}
|
||||
|
||||
function apiRequestJson($method, $parameters) {
|
||||
if (!is_string($method)) {
|
||||
error_log("Method name must be a string\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$parameters) {
|
||||
$parameters = array();
|
||||
} else if (!is_array($parameters)) {
|
||||
error_log("Parameters must be an array\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
$parameters["method"] = $method;
|
||||
|
||||
$handle = curl_init(API_URL);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($handle, CURLOPT_TIMEOUT, 60);
|
||||
curl_setopt($handle, CURLOPT_POST, true);
|
||||
curl_setopt($handle, CURLOPT_POSTFIELDS, json_encode($parameters));
|
||||
curl_setopt($handle, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
||||
|
||||
return exec_curl_request($handle);
|
||||
}
|
||||
|
||||
function processMessage($message) {
|
||||
// process incoming message
|
||||
$message_id = $message['message_id'];
|
||||
$chat_id = $message['chat']['id'];
|
||||
if (isset($message['text'])) {
|
||||
// incoming text message
|
||||
$text = $message['text'];
|
||||
|
||||
if (strpos($text, "/start") === 0) {
|
||||
apiRequestJson("sendMessage", array('chat_id' => $chat_id, "text" => 'Hello', 'reply_markup' => array(
|
||||
'keyboard' => array(array('Hello', 'Hi')),
|
||||
'one_time_keyboard' => true,
|
||||
'resize_keyboard' => true)));
|
||||
} else if ($text === "Hello" || $text === "Hi") {
|
||||
apiRequest("sendMessage", array('chat_id' => $chat_id, "text" => 'Nice to meet you'));
|
||||
} else if (strpos($text, "/stop") === 0) {
|
||||
// stop now
|
||||
} else {
|
||||
apiRequestWebhook("sendMessage", array('chat_id' => $chat_id, "reply_to_message_id" => $message_id, "text" => 'Cool'));
|
||||
}
|
||||
} else {
|
||||
apiRequest("sendMessage", array('chat_id' => $chat_id, "text" => 'I understand only text messages'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
define('WEBHOOK_URL', 'https://my-site.example.com/secret-path-for-webhooks/');
|
||||
|
||||
if (php_sapi_name() == 'cli') {
|
||||
// if run from console, set or delete webhook
|
||||
apiRequest('setWebhook', array('url' => isset($argv[1]) && $argv[1] == 'delete' ? '' : WEBHOOK_URL));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$content = file_get_contents("php://input");
|
||||
$update = json_decode($content, true);
|
||||
|
||||
if (!$update) {
|
||||
// receive wrong update, must not happen
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($update["message"])) {
|
||||
processMessage($update["message"]);
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_wrap">
|
||||
<div class="footer_columns_wrap footer_desktop">
|
||||
<div class="footer_column footer_column_telegram">
|
||||
<h5>Telegram</h5>
|
||||
<div class="footer_telegram_description"></div>
|
||||
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
||||
</div>
|
||||
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li><a href="//telegram.org/blog">Blog</a></li>
|
||||
<li><a href="//telegram.org/jobs">Jobs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
||||
<li><a href="//telegram.org/dl/android">Android</a></li>
|
||||
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
||||
<li><a href="//macos.telegram.org/">macOS</a></li>
|
||||
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?42"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
151
data/core.telegram.org/mtproto/TL-optargs.html
Normal file
151
data/core.telegram.org/mtproto/TL-optargs.html
Normal file
|
@ -0,0 +1,151 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Optional combinator parameters and their values</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="TL Language makes it possible to declare a combinator’s first few parameters optional. Subsequently, they are almost never…">
|
||||
<meta property="og:title" content="Optional combinator parameters and their values">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="TL Language makes it possible to declare a combinator’s first few parameters optional. Subsequently, they are almost never…">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
||||
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body class="preload">
|
||||
<div class="dev_page_wrap">
|
||||
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clearfix">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="//telegram.org/">Home</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
||||
<li class=""><a href="/api">API</a></li>
|
||||
<li class="active"><a href="/mtproto">Protocol</a></li>
|
||||
<li class=""><a href="/schema">Schema</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container clearfix">
|
||||
<div class="dev_page">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/TL-optargs" >Optional combinator parameters and their…</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Optional combinator parameters and their values</h1>
|
||||
|
||||
<div id="dev_page_content"><p><a href="TL">TL Language</a> makes it possible to declare a combinator’s first few parameters optional. Subsequently, they are almost never required to be explicitly stated. This is directly related to another important property of TL: <a href="TL-polymorph">polymorphism</a>.</p>
|
||||
<p>All optional parameters are typically required to be part of the result type (at least once).</p>
|
||||
<p>A (sub)expression may be serialized/deserialized in one of two ways:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The result type is known (for example, we’re parsing the response to a previously sent RPC query and therefore know the value of some type is expected). In this case, the result type may be used to determine the values of the combinator’s implicit parameters.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The result type is not known. It is determined as a result of (de)serialization (for example, we are serializing an RPC query). In this case, it is necessary to explicitly specify (and serialize) all of the combinator’s optional parameters by using the full version of the combinator.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>We will assume that the functional combinator only differs from the constructor in that before its result type the <code>!</code> modifier is implicitly added, and the (remote or local) computation of a functional expression may be presented as the execution of some polymorphic function <code>eval : !X -> X</code>.</p>
|
||||
<p>Moreover, the unknown result type is obviously usually (but not always) bound to the serialization of an expression whose type has been modified by <code>!</code>.</p>
|
||||
<p>We can formulate the following rules. Let there be some constructor</p>
|
||||
<pre><code>C {a1:T1} ... {am:Tm} b1:U1 ... bn:Un = T;</code></pre>
|
||||
<p>Some of its arguments or its result may be marked with the <code>!</code> modifier (We consider a functional combinator to be a constructor whose result type has been modified by an implicit <code>!</code>).</p>
|
||||
<p>The following conditions must hold:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Each type <em>T1</em>, ..., <em>Tm</em>, <em>U1</em>, ..., <em>Un</em>, and <em>T</em> may depend on parameters of type <code>Type</code> or <code>#</code>, which have been declared to the left of the use of the given type.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The types of implicit parameters <em>T1</em>, ..., <em>Tm</em> may not be modified by <code>!</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Only implicit parameters of type <code>Type</code> or <code>#</code> are allowed. In other words, <em>Ti</em> is either a <code>Type</code> or a <code>#</code>. (Unlike the previous rule, this rule may be relaxed in the future.)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Each implicit parameter <em>a1</em>, ..., <em>am</em> must be used at least once -- either within one of the <em>Ui</em> types that have a <code>!</code>, or in the result type <em>T</em>, <em>if it does not have an explicit or implicit <code>!</code></em>. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If an implicit parameter <em>ai</em> is not used in the result type, or if the result type has a <code>!</code>, then its first (leftmost) usage must be within a type <em>Uj</em> that is modified by <code>!</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The idea is this: we assume that during (de)serialization of a value of a type modified by <code>!</code> that we do not know this type in advance and we will find out what it is only based on the result of the (de)serialization; Conversely, we assume that during (de)serialization of a value of a type that is not modified by <code>!</code> that we know this type in advance. In this case, complying with the rules stated above lets us always compute the values of all implicit parameters -- either from the (previously known) result type or from the type of one of the <code>bj:!Uj</code> parameters (which was obtained during the serialization process).</p>
|
||||
<p>In fact, <code>!</code> denotes the direction in which type information is flowing. By default, the result type is the source of information about types (and their parameters), while argument types are the recipients of that information. The use of <code>!</code> reverses the direction of information flow, making the result type the recipient and the argument type the source of type information.</p>
|
||||
<p>See also <a href="TL-abstract-types">Binary serialization and abstract TL types</a> and <a href="TL-polymorph">Polymorphism in TL</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_wrap">
|
||||
<div class="footer_columns_wrap footer_desktop">
|
||||
<div class="footer_column footer_column_telegram">
|
||||
<h5>Telegram</h5>
|
||||
<div class="footer_telegram_description"></div>
|
||||
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
||||
</div>
|
||||
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li><a href="//telegram.org/blog">Blog</a></li>
|
||||
<li><a href="//telegram.org/jobs">Jobs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
||||
<li><a href="//telegram.org/dl/android">Android</a></li>
|
||||
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
||||
<li><a href="//macos.telegram.org/">macOS</a></li>
|
||||
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?42"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,265 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Telegram Support Force</title>
|
||||
<meta property="og:title" content="Answering Questions">
|
||||
<meta property="og:description" content="We answer questions. This document holds general ideas on how to handle them.
|
||||
This was intended for volunteers of the Telegram…">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="alternate icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?212" rel="stylesheet">
|
||||
<link href="/css/tsf.css?7" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css" rel="stylesheet">
|
||||
<link href="/css/health.css?126" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
<link href="/css/billboard.css?17" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body class="emoji_image no-transition">
|
||||
|
||||
<div id="aj_progress" class="progress-bar"></div>
|
||||
|
||||
<div id="aj_content"><div class="tr-container">
|
||||
<header>
|
||||
<div class="container">
|
||||
<div class="header-wrap">
|
||||
<div id="header-panel" class="header-panel">
|
||||
<div class="header-auth">
|
||||
<div class="header-auth-item"><a class="header-search-btn"></a></div><div class="header-auth-item"><a class="header-auth-link login-link" href="/auth">Login</a></div>
|
||||
</div>
|
||||
<div class="header-breadcrumb header-breadcrumb-simple">
|
||||
<ol id="breadcrumb" class="header-nav breadcrumb"><li><a href="/">Telegram Support Force</a></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container">
|
||||
<nav class="tr-menu">
|
||||
<div class="tr-menu-section">
|
||||
<div class="tr-menu-header">
|
||||
<div class="tr-menu-header-label">Resources</div>
|
||||
</div>
|
||||
<ul class="tr-menu-items"><li>
|
||||
<a class="tr-menu-item" href="/">
|
||||
<span class="nav-label">Introduction</span>
|
||||
</a>
|
||||
</li><li class="active">
|
||||
<a class="tr-menu-item" href="/manuals">
|
||||
<span class="nav-label">Manuals</span>
|
||||
</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
|
||||
</nav>
|
||||
<section class="content clearfix">
|
||||
<section class="tr-content"><div id="dev_page_content_wrap" class=" ">
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/" >Telegram Support Initiative</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/manuals" >Manuals</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/manuals/answering_questions" >Answering Questions</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Answering Questions</h1>
|
||||
|
||||
<div id="dev_page_content"><p>We answer questions. This document holds general ideas on how to handle them.<br>This was intended for volunteers of the <a href="/">Telegram Support Force</a>, but anyone else is free to take a look as well.</p>
|
||||
<h3><a class="anchor-link" href="#general"><i class="anchor-icon"></i></a><a class="anchor" name="general"></a>General</h3>
|
||||
<ol>
|
||||
<li><p>Our goal is to bring human support to human beings. To achieve this goal, we rely on volunteers. Your pay is perfection in what you do, so be cool.</p>
|
||||
</li>
|
||||
<li><p>Corporate support standards do not apply here. Treat people in a kind, personal, informal manner. No need to pretend to be something you are not (unless you're a dog in disguise — keep human appearances in this case).</p>
|
||||
</li>
|
||||
<li><p>Never lie to people.</p>
|
||||
</li>
|
||||
<li><p>Check everything before you reply. Things change or may no longer work the way you remember. This includes interface details, links (!) and, well, everything.</p>
|
||||
</li>
|
||||
<li><p>Support is a form of Art, so be fun and creative.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h3><a class="anchor-link" href="#the-result"><i class="anchor-icon"></i></a><a class="anchor" name="the-result"></a>The result</h3>
|
||||
<p>As support volunteers, we need to provide a <strong>solution</strong> for the user. Remember, that this doesn't always have to be the solution the user was asking for. So first, we want to understand the <strong>problem</strong> that drove them to ask the question. And then find a way of solving — completely or partially — that problem.</p>
|
||||
<p>For example, some users ask us for an option to send sketches or drawings to their friends. While this is not possible directly, one could take a photo with their thumb on the camera (to get a black picture), then use the drawing tools built into the photo editor to make their doodle.</p>
|
||||
<p>This isn‘t what the user was looking for, but it solves the problem — and it is even more flexible and customizable than the original idea (since you could also add stickers and emoji out of the box). Some solutions are less elegant. For example, right now you can’t email your Telegram conversations. While there is much less need to do so, since you can access everything in the cloud from any of your devices, this may be a problem in some cases. What one could do then, is open the conversation in Telegram Web (or any other desktop client), select multiple messages with the mouse, then copy and paste them into a text document. Any solution is better than no solution at all.</p>
|
||||
<p>There will be cases, when it is not possible to solve the problem at all. As a user in this situation, I want that people on the other end of the line <strong>understand</strong> me and <strong>care</strong> about the whole thing. Therefore, two things become important:</p>
|
||||
<ul>
|
||||
<li>Make it clear that you understand the issue. ‘No, you can’t do that‘ is not a good answer. ’No, I‘m afraid it is not possible to make Telegram wash your dishes in a fast and securely encrypted way’ — is better.</li>
|
||||
<li>Be gentle. Gentle doesn‘t mean soft — if we really can’t do something, it means just that — we can‘t. But adding ’Sorry about that' helps a lot.</li>
|
||||
</ul>
|
||||
<p>Lastly, whatever the outcome, I always look for help from a human being, not a dumb interface. When you're casual and witty, the user feels more at ease. On the other hand, human beings, as opposed to dumb interfaces, usually understand what is appropriate in which situation. For example, when a user is in distress, he most likely needs help first — and jokes can wait until the crisis has been dealt with.</p>
|
||||
<hr>
|
||||
<p>To sum up, we need to be: <strong>smart</strong> (to identify the problem and find an approach to the user), <strong>inventive</strong> (to find a solution, not always the obvious one), <strong>compassionate</strong> (in case there is no immediate solution) — and <strong>witty</strong> (otherwise it gets boring). I'm sure we are.</p>
|
||||
<h3><a class="anchor-link" href="#what-if-i-don-39t-know-the-answer"><i class="anchor-icon"></i></a><a class="anchor" name="what-if-i-don-39t-know-the-answer"></a>What if I don't know the answer</h3>
|
||||
<p>Happens to all. Don't worry, you can always find one. The <a href="/manuals/bios">TSF BIOS</a> will tell you what to do in most situations. In case it doesn‘t or you’re not sure, ask your fellow volunteers in the group — they should know. If worst comes to worst, consult Markus.</p>
|
||||
<p>Admitting you don't know something is <strong>infinitely</strong> better than trying to cover it up. So when cornered use this mantra: ‘I’m afraid I don‘t know this. Will ask my teammates and get back to you’. Just make sure that the question is not in the FAQs before you say this.</p>
|
||||
<h3><a class="anchor-link" href="#handling-user-suggestions"><i class="anchor-icon"></i></a><a class="anchor" name="handling-user-suggestions"></a>Handling user suggestions</h3>
|
||||
<p>The three rules for requests and suggestions are: don‘t lie, don’t promise anything, and don't give an exact timeframe.</p>
|
||||
<ul>
|
||||
<li>The internal <a href="https://trello.com/b/TgdZ0YI6">Suggestions board</a> on Trello has a list of most frequently suggested features together with estimations on how likely, when and why they will be introduced. </li>
|
||||
<li>For insights into the decision making process, check our <a href="/manuals/feature_philosophy">Feature Philosophy</a>.</li>
|
||||
</ul>
|
||||
<p>Plans change frequently, so it‘s best if we only talk about things that exist. Never say that something will be done. ’We may do this‘, ’we will definitely add this at some point in the future‘ or ’this is coming soon' — is as far as we can go.</p>
|
||||
<p>Same applies to the negative: never say we will never do something (except steal users‘ spouses and enslave their children, as mentioned in the general FAQ). The worst thing that can happen is ’we are currently not working on this‘, ’we may consider this', etc.</p>
|
||||
<p>Even if you know something is happening tomorrow, say ‘in the next few days’. People love it when they get things earlier than they expected — and get downright angry if we get 5 minutes (or a few months) late.</p>
|
||||
<h3><a class="anchor-link" href="#reporting-bugs-in-telegram"><i class="anchor-icon"></i></a><a class="anchor" name="reporting-bugs-in-telegram"></a>Reporting bugs in Telegram</h3>
|
||||
<p>Every now and then you will get actual bug-reports. We have an internal board on <a href="https://trello.com/b/ll9sbLcd">trello</a>, so you will be able to search all known issues and get the relevant info.</p>
|
||||
<ul>
|
||||
<li>The <a href="/manuals/bugs">Handling Bugs</a> manual covers all you need to know about bug reporting in Telegram.</li>
|
||||
<li>The internal <a href="https://trello.com/b/ll9sbLcd">Issues board</a> on Trello lists all known issues.</li>
|
||||
</ul>
|
||||
<p>If you are not part of the team and are looking for advanced troubleshooting tips, you may find the <a href="/manuals/bugs#troubleshooting-common-issues">Troubleshooting</a> section interesting.</p>
|
||||
<h3><a class="anchor-link" href="#chatting"><i class="anchor-icon"></i></a><a class="anchor" name="chatting"></a>Chatting</h3>
|
||||
<p>Truth is, most users come to simply say ‘hello’. Hello them back if you have the time. Sometimes these users do have a question after all. In other cases they may be new to Telegram, without many friends to chat with or show them around. So you can tell them more about Telegram, point to interesting features — or even other <a href="//telegram.org/apps">Telegram apps</a>. No need to advertise, just explain what needs explaining.</p>
|
||||
<p>Remember: we’re here to help those we can help and talk to others that we feel we have the time to talk to, but not more. If kids get too insistent without any real needs, it’s ok to ignore them after a few replies. If somebody seems to be a nice conversation partner, it’s always a good idea to discuss Telegram, see what the user thinks is missing. Maybe tell them about our <a href="/">Support Initiative</a>.</p>
|
||||
<h3><a class="anchor-link" href="#real-life-problems"><i class="anchor-icon"></i></a><a class="anchor" name="real-life-problems"></a>Real-life problems</h3>
|
||||
<p>Unfortunately, we cannot really help people with real-life problems. A few kind words wouldn‘t hurt, but generally we should send those users to places where they can get actual help, like a crisis line or chat. (Now, if you want to be a member of the TSF and read this far, go send a picture of a kangaroo to the auditions account. No, this is not a joke. It is a test that helps us understand whether or not you actually read this. And don’t tell others. If you're already a member, you know what to do: humpa viceroy squid)</p>
|
||||
<h3><a class="anchor-link" href="#insults"><i class="anchor-icon"></i></a><a class="anchor" name="insults"></a>Insults</h3>
|
||||
<p>Yep, everyone gets their share of those. First of all, remember that these people are not really talking to you. They just see an abstract ‘Telegram’ entity. My advice is to humor them — I usually send a ‘well, that escalated quickly’ picture and it helps many users. Joke around with them and you’ll be surprised how that can humble people. And never insult back, even if they manage to get you angry for some reason. Nonviolent irony is always your best — and only — weapon.</p>
|
||||
<hr>
|
||||
<h5><a class="anchor-link" href="#other-tsf-documents"><i class="anchor-icon"></i></a><a class="anchor" name="other-tsf-documents"></a>Other TSF documents:</h5>
|
||||
<p><div class="dev_page_nav_wrap"></p>
|
||||
<ul>
|
||||
<li><a href="/">TSF Manifesto</a></li>
|
||||
<li><a href="/manuals/bios">BIOS</a></li>
|
||||
<li><strong><a href="/manuals/answering_questions">Answering questions</a></strong> (you are here)</li>
|
||||
<li><a href="/manuals/bugs">Bug handling and troubleshooting</a></li>
|
||||
<li><a href="/manuals/feature_philosophy">Feature Philosophy</a></li>
|
||||
</ul>
|
||||
<p></div></p>
|
||||
</div>
|
||||
|
||||
</div></section>
|
||||
</section>
|
||||
</main>
|
||||
</div><div class="popup-container login-popup-container hide" id="login-popup-container">
|
||||
<div class="popup">
|
||||
<div class="popup-body">
|
||||
<section>
|
||||
<h2>Log In</h2>
|
||||
<p>Log in here to access your TSF stats. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
|
||||
|
||||
<form id="send-form" class="login-form">
|
||||
<div class="form-group">
|
||||
<input type="tel" class="form-control tr-form-control input-lg" id="login-phone" placeholder="+12223334455" autocomplete="off"/>
|
||||
</div>
|
||||
<div class="popup-buttons">
|
||||
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="login-form" class="hide">
|
||||
<div class="form-group">
|
||||
<span class="form-control tr-form-control input input-lg input-disabled"><strong id="login-phone-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
|
||||
<p class="help-block dots-animated">We've just sent you a message.<br/>Please confirm access via Telegram</p>
|
||||
</div>
|
||||
<div class="popup-buttons">
|
||||
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/main-aj.js?48"></script>
|
||||
<script src="/js/main.js?42"></script>
|
||||
<script src="/js/tsf.js?3"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/tchart.min.js?13"></script>
|
||||
<script src="/js/billboard.min.js"></script>
|
||||
<script src="/js/stats.js?17"></script>
|
||||
|
||||
<script>ajInit({"version":544,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">Aj.onLoad(function(state) {
|
||||
function requestConfirmation(event) {
|
||||
event && event.preventDefault();
|
||||
var phone = $('#login-phone').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/auth/request',
|
||||
data: {
|
||||
phone: phone
|
||||
},
|
||||
success: function(result) {
|
||||
$('#login-phone-field').text(phone);
|
||||
$('#send-form').addClass('hide');
|
||||
$('#login-form').removeClass('hide');
|
||||
checkAuth(result.temp_session);
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert(xhr.responseText);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
function cancelConfirmation(event) {
|
||||
event && event.preventDefault();
|
||||
$('#login-phone-field').text('');
|
||||
$('#send-form').removeClass('hide');
|
||||
$('#login-form').addClass('hide');
|
||||
$('#login-phone').focus();
|
||||
clearTimeout(window.authTimeout);
|
||||
return false;
|
||||
}
|
||||
function checkAuth(temp_session) {
|
||||
clearTimeout(window.authTimeout);
|
||||
window.authTimeout = setTimeout(function doCheckAuth() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/auth/login',
|
||||
data: {
|
||||
temp_session: temp_session
|
||||
},
|
||||
success: function(result) {
|
||||
if (result) {
|
||||
location.reload();
|
||||
} else {
|
||||
checkAuth(temp_session);
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
showAlert(xhr.responseText);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
}, 700);
|
||||
}
|
||||
$('#login-popup-container').on('popup:open', function() {
|
||||
$('#login-phone').focus();
|
||||
});
|
||||
$('#login-popup-container').on('popup:close', function() {
|
||||
cancelConfirmation();
|
||||
if (location.pathname == '/auth') {
|
||||
window.history && history.replaceState(null, null, '/');
|
||||
}
|
||||
});
|
||||
$('#login-popup-container #send-form').on('submit', requestConfirmation);
|
||||
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
closePopup('#login-popup-container');
|
||||
});
|
||||
$('#login-popup-container .login-back').on('click', cancelConfirmation);
|
||||
$('header .login-link').on('click', function(e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
openPopup('#login-popup-container');
|
||||
});
|
||||
});
|
||||
Aj.onUnload(function(state) {
|
||||
$('#login-popup-container').off('popup:open');
|
||||
$('#login-popup-container').off('popup:close');
|
||||
$('#login-popup-container #send-form').off('submit');
|
||||
$('#login-popup-container .login-cancel-btn').off('click');
|
||||
$('#login-popup-container .login-back').off('click');
|
||||
$('header .login-link').off('click');
|
||||
});
|
||||
</script>
|
||||
<script>Aj.pageLoaded();</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in a new issue