Error 401 telebot

Использую модуль telebot. решил написать простенькое: import telebot bot = telebot.TeleBot('776550937:AAELEr0c3H6dM-9QnlDD-0Q0Fcd65pPyAiM') @bot.message_handler(commands=['start']) def start_mes...

Использую модуль telebot. решил написать простенькое:

import telebot

bot = telebot.TeleBot('776550937:AAELEr0c3H6dM-9QnlDD-0Q0Fcd65pPyAiM')

@bot.message_handler(commands=['start'])
def start_message(message):
    bot.send_message(message.chat.id, 'Привет, ты написал мне /start')

bot.polling()

(На сайте было)
Запускаю через cmd и выдаёт сначала одну ошибку. Её исправил но после появилась другая:

2019-06-18 23:35:23,717 (util.py:65 PollingThread) ERROR - TeleBot: "ApiException occurred, args=('A request to the Telegram API was unsuccessful. The server returned HTTP 401 Unauthorized. Response body:n[b'{"ok":false,"error_code":401,"description":"Unauthorized"}']',)
Traceback (most recent call last):
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebotutil.py", line 59, in run
    task(*args, **kwargs)
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebot__init__.py", line 276, in __retrieve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebot__init__.py", line 246, in get_updates
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebotapihelper.py", line 180, in get_updates
    return _make_request(token, method_url, params=payload)
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebotapihelper.py", line 56, in _make_request
    return _check_result(method_name, result)['result']
  File "C:UsersUserAppDataLocalProgramsPythonPython36libsite-packagestelebotapihelper.py", line 75, in _check_result
    raise ApiException(msg, method_name, result)
telebot.apihelper.ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 401 Unauthorized. Response body:
[b'{"ok":false,"error_code":401,"description":"Unauthorized"}']
"
2019-06-18 23:35:23,730 (__init__.py:417 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 401 Unauthorized. Response body:
[b'{"ok":false,"error_code":401,"description":"Unauthorized"}']"

Yes,
Now i getting this:

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
2016-05-21 12:01:06,495 (__init__.py:211 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned an invalid JSON response. Response body:
[<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Bots: An introduction for developers</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta property="og:title" content="Bots: An introduction for developers">
    <meta property="og:image" content="https://core.telegram.org/file/811140663/1/uHVzwsRJz3Y/a499733c59840694ca">
    <meta property="og:description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands..">
    <link rel="shortcut icon" href="/favicon.ico?3" type="image/x-icon" />

    <link href="/css/bootstrap.min.css?2" rel="stylesheet">

    <link href="/css/telegram.css?103" rel="stylesheet" media="screen">
    <style>
    </style>
  </head>
  <body>
    <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"></div>
  <h1 id="dev_page_title">Bots: An introduction for developers</h1>

  <div id="dev_page_content"><!-- scroll_nav -->

<p>Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and <a href="#inline-mode">inline requests</a>. You control your bots using HTTPS requests to our <a href="/bots/api">bot API</a>.</p>
<h3><a class="anchor" name="1-what-can-i-do-with-bots" href="#1-what-can-i-do-with-bots"><i class="anchor-icon"></i></a>1. What can I do with bots?</h3>
<div class="dev_side_image">
    <a href="/file/811140081/1/VldnlW70g2I/a140b0216e7d156ebc" target="_blank"><img src="/file/811140663/1/uHVzwsRJz3Y/a499733c59840694ca" title="A chat with @TechCrunchBot also showing search results from the @gif inline-bot"  /></a>
</div>

<p>To name just a few things, you could use bots to:</p>
<ul>
<li><p><strong>Get customized notifications and news</strong>. A bot can act as a smart newspaper, sending you relevant content as soon as it's published.<br><a href="https://telegram.me/ForbesBot"><strong>Forbes Bot</strong></a>, <a href="https://telegram.me/TechCrunchBot"><strong>TechCrunch Bot</strong></a></p>
</li>
<li><p><strong>Integrate with other services</strong>. A bot can enrich Telegram chats with content from external services.<br><a href="https://telegram.me/imagebot"><strong>Image Bot</strong></a>, <a href="https://telegram.me/gif"><strong>GIF bot</strong></a>, <a href="https://telegram.me/imdb"><strong>IMDB bot</strong></a>, <a href="https://telegram.me/wiki"><strong>Wiki bot</strong></a>, <a href="https://telegram.me/music"><strong>Music bot</strong></a> <strong>(NEW)</strong>, <a href="https://telegram.me/youtube"><strong>Youtube bot</strong></a> <strong>(NEW)</strong></p>
</li>
<li><p><strong>Create custom tools</strong>. A bot may provide you with alerts, weather forecasts, translations, formatting or other services.<br><a href="https://telegram.me/PollBot"><strong>Poll bot</strong></a>, <a href="https://telegram.me/githubbot"><strong>GitHub bot</strong></a>, <a href="https://telegram.me/Bold"><strong>Markdown bot</strong></a>, <a href="https://telegram.me/sticker"><strong>Sticker bot</strong></a> <strong>(NEW)</strong></p>
</li>
<li><p><strong>Build single- and multiplayer games</strong>. A bot can play chess and checkers against you, act as host in quiz games, or even take up the dungeon master's dice for an RPG.<br><a href="https://telegram.me/TriviaBot"><strong>Trivia bot</strong></a></p>
</li>
<li><p><strong>Build social services</strong>. A bot could connect people looking for conversation partners based on common interests or proximity.<br><a href="https://telegram.me/hotorbot"><strong>HotOrBot</strong></a></p>
</li>
<li><p><strong>Do virtually anything else</strong>. Except for dishes — bots are terrible at doing the dishes.</p>
</li>
</ul>
<h3><a class="anchor" name="2-how-do-bots-work" href="#2-how-do-bots-work"><i class="anchor-icon"></i></a>2. How do bots work?</h3>
<p>At the core, Telegram Bots are special accounts that do not require an additional phone number to set up. Users can interact with bots in two ways:</p>
<ul>
<li>Send messages and <a href="#commands">commands</a> to bots by opening a chat with them or by adding them to groups. This is useful for chat bots or news bots like the official <a href="https://telegram.me/techcrunchbot">TechCrunch</a> and <a href="https://telegram.me/forbesbot">Forbes</a> bots.</li>
<li>Send requests directly from the input field by typing the bot's @username and a query. This allows sending content from <a href="/bots/inline">inline bots</a> directly into any chat, group or channel.</li>
</ul>
<p>Messages, commands and requests sent by users are passed to the software running on your servers. Our intermediary server handles all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API. We call that interface our <a href="/bots/api">Bot API</a>.</p>
<blockquote>
<p>A detailed description of the Bot API is available on <a href="/bots/api">this page »</a></p>
</blockquote>
<h3><a class="anchor" name="3-how-do-i-create-a-bot" href="#3-how-do-i-create-a-bot"><i class="anchor-icon"></i></a>3. How do I create a bot?</h3>
<div class="dev_side_image">
    <a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140763/1/PihKNbjT8UE/03b57814e13713da37" title="The Botfather. Click for hi-res picture"/></a>
</div>

<p>There's a… bot for that. Just talk to <a href="https://telegram.me/botfather">BotFather</a> (described <a href="#botfather">below</a>) and follow a few simple steps. Once you've created a bot and received your authorization token, head down to the <a href="/bots/api">Bot API manual</a> to see what you can teach your bot to do.</p>
<blockquote>
<p>You may also like to check out some <strong>code examples</strong> <a href="/bots/samples">here »</a></p>
</blockquote>
<h3><a class="anchor" name="4-how-are-bots-different-from-humans" href="#4-how-are-bots-different-from-humans"><i class="anchor-icon"></i></a>4. How are bots different from humans?</h3>
<ul>
<li>Bots have no online status and no last seen timestamps, the interface shows the label <strong>‘bot’</strong> instead.</li>
<li>Bots have limited cloud storage — older messages may be removed by the server shortly after they have been processed.</li>
<li>Bots can't initiate conversations with users. A user <strong>must</strong> either add them to a group or send them a message first. People can use <code>telegram.me/&lt;bot_username&gt;</code> links or username search to find your bot.</li>
<li>Bot usernames always end in ‘bot’ (e.g. <a href="https://telegram.me/triviabot">@TriviaBot</a>, <a href="https://telegram.me/githubbot">@GitHub_bot</a>).</li>
<li>When added to a group, bots do not receive all messages by default (see <a href="#privacy-mode">Privacy mode</a>).</li>
<li>Bots never eat, sleep or complain (unless expressly programmed otherwise).</li>
</ul>
<hr>
<h3><a class="anchor" name="5-bot-perks" href="#5-bot-perks"><i class="anchor-icon"></i></a>5. Bot perks</h3>
<p>Telegram bots are unique in many ways — we offer <a href="#keyboards">two</a> <a href="#inline-keyboards-and-on-the-fly-updating">kinds</a> of keyboards, additional interfaces for <a href="#global-commands">default commands</a> and <a href="#deep-linking">deep linking</a> as well as <a href="#markdown-bold-italic-and-url-text">markdown support</a> and much, much more.</p>
<h4><a class="anchor" name="inline-mode" href="#inline-mode"><i class="anchor-icon"></i></a>Inline mode</h4>
<div class="dev_side_image">
  <a href="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4" target="_blank"><img src="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305" title="Inline bots. Click for hi-res picture">
</a></div>


<p>Users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a> straight from the <strong>text input field</strong> in <strong>any</strong> chat. All they need to do is start a message with your bot's username and then type a query.</p>
<p>Having received the query, your bot can return some results. As soon as the user taps one of them, it will be sent to the user's currently opened chat. This way, people can request content from your bot in any of their chats, groups or channels.</p>
<p>Check out this <a href="https://telegram.org/blog/inline-bots">blog</a> to see a sample inline bot in action. You can also try the <a href="https://telegram.me/sticker">@sticker</a> and <a href="https://telegram.me/music">@music</a> bots to see for yourself.</p>
<div><center>
<a href="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" target="_blank"><img src="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" title="New input field"  style="width: 295px; padding: 10px 0px;" /></a></center><br>
</div>

<p>We've also implemented an easy way for your bot to <a href="/bots/inline#switching-inline-pm-modes">switch between inline and PM modes</a>.</p>
<blockquote>
<p><a href="/bots/inline">Read more about the inline mode »</a></p>
</blockquote>
<h4><a class="anchor" name="keyboards" href="#keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
<p>Traditional chat bots can of course be taught to understand human language. But sometimes you want some more formal input from the user — and this is where <strong>custom keyboards</strong> can become extremely useful.</p>
<p>Whenever your bot sends a message, it can pass along a special keyboard with predefined reply options (see <a href="/bots/api/#replykeyboardmarkup">ReplyKeyboardMarkup</a>). Telegram apps that receive the message will display your keyboard to the user. Tapping any of the buttons will immediately send the respective command. This way you can drastically simplify user interaction with your bot.</p>
<p>We currently support text and emoji for your buttons. Here are some custom keyboard examples:</p>
<center><div>
    <a href="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" target="_blank"><img src="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" title="Keyboard for a poll bot" style="max-height: 300px; padding: 10px 5px" /></a>

    <a href="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" target="_blank"><img src="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" title="Keyboard for a calculator bot. Because you can." style="max-height: 300px; padding: 10px 5px" /></a>

    <a href="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" target="_blank"><img src="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" title="Keyboard for a trivia bot" style="max-height: 300px; padding: 10px 5px" /></a><br><br>
</div></center>

<blockquote>
<p>For more technical information on custom keyboards, please consult the <a href="/bots/api">Bot API manual</a> (see <a href="/bots/api#sendmessage">sendMessage</a>).</p>
</blockquote>
<h4><a class="anchor" name="inline-keyboards-and-on-the-fly-updating" href="#inline-keyboards-and-on-the-fly-updating"><i class="anchor-icon"></i></a>Inline keyboards and on-the-fly updating</h4>
<p>There are times when you'd prefer to do things without sending any messages to the chat. For example, when your user is changing settings or flipping through search results. In such cases you can use Inline Keyboards that are integrated directly into the messages they belong to. </p>
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't result in messages sent to the chat. Instead, inline keyboards support buttons that work behind the scenes: <a href="/bots/2-0-intro#callback-buttons">callback buttons</a>, <a href="/bots/2-0-intro#url-buttons">URL buttons</a> and <a href="/bots/2-0-intro#switch-to-inline-buttons">switch to inline buttons</a>.</p>
<div><center>
  <a href="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" target="_blank"><img src="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" title="Callback buttons in @music"  style="width: 240px; padding: 10px 5px;" /></a>
    <a href="  /file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" target="_blank"><img src="  /file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" title="More callback buttons in @music"  style="width: 240px; padding: 10px 5px;" /></a>
     <a href="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" target="_blank"><img src="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" title="A URL button" style="width:240px; padding:10px 5px"/></a>

  </center><br>
</div>

<p>When callback buttons are used, your bot can update its existing messages (or just their keyboards) so that the chat remains tidy. Check out this sample bot to see inline keyboards in action: <a href="https://telegram.me/music">@music</a>.</p>
<blockquote>
<p><a href="/bots/2-0-intro#new-inline-keyboards">Read more about inline keyboards and on-the-fly editing »</a></p>
</blockquote>
<h4><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a>Commands</h4>
<p>Commands present a more flexible way to communicate with your bot. The following syntax may be used:</p>
<pre><code>/command [optional] [argument]</code></pre>
<p>A command must always start with the ‘/’ symbol and may not be longer than 32 characters. Commands can use latin letters, numbers and underscores. Here are a few examples:</p>
<pre><code>/get_messages_stats
/set_timer 10min Alarm!
/get_timezone London, UK</code></pre>
<p>Messages that start with a slash will be always passed to the bot (along with replies to its messages and messages that @mention the bot by username). Telegram apps will:</p>
<ul>
<li>Suggest a list of <a href="#edit-settings">supported commands</a> with descriptions when the user enters a ‘/’ (for this to work, you need to have provided a list of commands to the <a href="#botfather">BotFather</a>). Tapping on a command in the list immediately sends the command.</li>
<li>Show an additional <strong>(/)</strong> button in the input field in all chats with bots. Tapping it types a ‘/’ and shows the list of commands.</li>
<li>Highlight <strong>/commands</strong> in messages. When the user taps a highlighted command, the command is sent at once.</li>
</ul>
<center><div>
    <a href="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" target="_blank"><img src="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" title="Suggested commands" style="width: 230px; padding: 10px 5px" /></a>

    <a href="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" target="_blank"><img src="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" title="Notice the new button in the input field, right next to the sticker button" style="width: 230px; padding: 10px 5px" /></a>


    <a href="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" target="_blank"><img src="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" title="Suggested commands for multiple bots" style="width: 230px; padding: 10px 5px" /></a>

<br><br>
</div></center>


<p>If multiple bots are in a group, it is possible to add bot usernames to commands in order to avoid confusion:</p>
<pre><code>/start@TriviaBot
/start@ApocalypseBot</code></pre>
<p>This is done automatically when commands are selected via the list of suggestions. Please remember that your bot needs to be able to process commands that are followed by its username.</p>
<h5><a class="anchor" name="global-commands" href="#global-commands"><i class="anchor-icon"></i></a>Global commands</h5>
<p>In order to make it easier for users to navigate the bot multiverse, we ask all developers to support a few basic commands. Telegram apps will have <strong>interface shortcuts</strong> for these commands.</p>
<ul>
<li><strong>/start</strong> - begins interaction with the user, e.g., by sending a greeting message. This command can also be used to pass additional parameters to the bot (see <a href="#deep-linking">Deep linking</a>)</li>
<li><strong>/help</strong> - returns a help message. It can be a short text about what your bot can do and a list of commands.</li>
<li><strong>/settings</strong> - (if applicable) returns the bot's settings for this user and suggests commands to edit these settings.</li>
</ul>
<p>Users will see a <strong>Start</strong> button when they first open a conversation with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page.</p>
<center><div>
    <a href="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" target="_blank"><img src="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" title="An empty conversation with a bot" style="width: 250px; padding: 10px 5px" /></a>

    <a href="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" target="_blank"><img src="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" title="A bot's profile page, featuring 'Help' and 'Settings' buttons" style="width: 250px; padding: 10px 5px" /></a><br>
</div></center>

<h4><a class="anchor" name="formatting-bold-italic-fixed-width-text-and-inline-links" href="#formatting-bold-italic-fixed-width-text-and-inline-links"><i class="anchor-icon"></i></a>Formatting: bold, italic, fixed-width text and inline links</h4>
<p>You can use bold, italic or fixed-width text, as well as inline links in your bots' messages. Telegram clients will render them accordingly. </p>
<blockquote>
<p><a href="bots/api#formatting-options">Read more in the Bot API manual »</a></p>
</blockquote>
<h4><a class="anchor" name="privacy-mode" href="#privacy-mode"><i class="anchor-icon"></i></a>Privacy mode</h4>
<p>Bots are frequently added to groups in order to augment communication between human users, e.g. by providing news, notifications from external services or additional search functionality. This is especially true for work-related groups. Now, when you share a group with a bot, you tend to ask yourself “How can I be sure that the little rascal isn't selling my chat history to my competitors?” The answer is — <strong>privacy mode</strong>.</p>
<p>A bot running in privacy mode will not receive all messages that people send to the group. Instead, it will only receive:</p>
<ul>
<li>Messages that start with a slash ‘/’ (see <a href="#commands">Commands</a> above)</li>
<li>Replies to the bot's own messages</li>
<li>Service messages (people added or removed from the group, etc.)</li>
</ul>
<p>On one hand, this helps some of us sleep better at night (in our tinfoil nightcaps), on the other — it allows the bot developer to save a lot of resources, since they won't need to process tens of thousands irrelevant messages each day.</p>
<p>Privacy mode is enabled by default for all bots, except bots that were added to the group as <strong>admins</strong>. It can be disabled, so that the bot will begin receiving all messages like an ordinary user. We only recommend doing this in cases where it is absolutely necessary for your bot to work — users can always see a bot's current privacy setting in the group members list. In most cases, using the <a href="/bots/api#forcereply">force reply</a> option for the bot's messages should be more than enough. </p>
<p><a href="/bots/faq#what-messages-will-my-bot-get">So what messages exactly will my bot get? »</a></p>
<h4><a class="anchor" name="deep-linking" href="#deep-linking"><i class="anchor-icon"></i></a>Deep linking</h4>
<p>Telegram bots have a <a href="https://en.wikipedia.org/wiki/Deep_linking">deep linking</a> mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an auth token to connect the user's Telegram account to their account on some external service.</p>
<p>Each bot has a link that opens a conversation with it in Telegram — <code>https://telegram.me/&lt;bot username&gt;</code>. You can add the parameters <strong>start</strong> or <strong>startgroup</strong> to this link, with values up to 64 characters long. For example:</p>
<pre><code>https://telegram.me/triviabot?startgroup=test</code></pre>
<p><code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed. We recommend using <a href="https://en.wikipedia.org/wiki/Base64#URL_applications">base64url</a> to encode parameters with binary and other types of content.</p>
<p>Following a link with the <strong>start</strong> parameter will open a one-on-one conversation with the bot, showing a START button in the place of the input field. If the <strong>startgroup</strong> parameter is used, the user will be prompted to select a group to add the bot to. As soon as a user confirms the action (presses the START button in their app or selects a group to add the bot to), your bot will receive a message from that user in this format:</p>
<pre><code>/start PAYLOAD</code></pre>
<p><code>PAYLOAD</code> stands for the value of the <strong>start</strong> or <strong>startgroup</strong> parameter that was passed in the link.</p>
<h5><a class="anchor" name="deep-linking-example" href="#deep-linking-example"><i class="anchor-icon"></i></a>Deep linking Example</h5>
<p>Suppose the website example.com would like to send notifications to its users via a Telegram bot. Here's what they could do to enable notifications for a user with the ID <code>123</code>.</p>
<ol>
<li><a href="#botfather">Create a bot</a> with a suitable username, e.g. @ExampleComBot</li>
<li>Set up a <a href="/bots/api#setwebhook">webhook</a> for incoming messages</li>
<li>Generate a random string of a sufficient length, e.g. <code>$memcache_key = &quot;vCH1vGWJxfSeofSAs0K5PA&quot;</code></li>
<li>Put the value <code>123</code> with the key <code>$memcache_key</code> into Memcache for 3600 seconds (one hour) </li>
<li>Show our user the button <code>https://telegram.me/ExampleComBot?start=vCH1vGWJxfSeofSAs0K5PA</code></li>
<li>Configure the webhook processor to query Memcached with the parameter that is passed in incoming messages beginning with <code>/start</code>. If the key exists, record the chat_id passed to the webhook as <strong>telegram_chat_id</strong> for the user <code>123</code>. Remove the key from Memcache.</li>
<li>Now when we want to send a notification to the user <code>123</code>, check if they have the field <strong>telegram_chat_id</strong>. If yes, use the <a href="/bots/api#sendmessage">sendMessage</a> method in the <a href="/bots/api">Bot API</a> to send them a message in Telegram.</li>
</ol>
<h4><a class="anchor" name="location-and-number" href="#location-and-number"><i class="anchor-icon"></i></a>Location and Number</h4>
<p>Some bots need extra data from the user to work properly. For example, knowing the user‘s location helps provide more relevant geo-specific results. The user’s phone number can be very useful for integrations with other services, like banks, etc.</p>
<p>Bots can ask a user for their <strong>location</strong> and <strong>phone number</strong> using special buttons. Note that both phone number and location request buttons will only work in private chats.</p>
<div><center>
<a href="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" target="_blank"><img src="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" title="Phone number and location sharing buttons"  style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>

<p>When these buttons are pressed, Telegram clients will display a confirmation alert that tells the user what's about to happen.</p>
<blockquote>
<p><a href="/bots/api#keyboardbutton">Manual: Number and location buttons »</a></p>
</blockquote>
<hr>
<h3><a class="anchor" name="6-botfather" href="#6-botfather"><i class="anchor-icon"></i></a>6. BotFather</h3>
<blockquote>
<p>Jump to top to learn everything about <a href="#">Telegram bots »</a></p>
</blockquote>
<p><a href="https://telegram.me/botfather">BotFather</a> is the one bot to rule them all. It will help you create new bots and change settings for existing ones.</p>
<h4><a class="anchor" name="create-a-new-bot" href="#create-a-new-bot"><i class="anchor-icon"></i></a>Create a new bot</h4>
<p>Use the <strong>/newbot</strong> command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot. </p>
<p>The <strong>name</strong> of your bot will be displayed in contact details and elsewhere.</p>
<p>The <strong>Username</strong> is a short name, to be used in mentions and telegram.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username <strong>must</strong> end in ‘bot’, e.g. ‘tetris_bot’ or ‘TetrisBot’.</p>
<p>The <strong>token</strong> is a string along the lines of <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code> that will be required to authorize the bot and send requests to the <a href="/bots/api">Bot API</a>.</p>
<h4><a class="anchor" name="generate-an-authorization-token-for-your-bot" href="#generate-an-authorization-token-for-your-bot"><i class="anchor-icon"></i></a>Generate an authorization token for your bot</h4>
<p>If your existing token is compromised or you lost it for some reason, use the <strong>/token</strong> command to generate a new one.</p>
<h4><a class="anchor" name="edit-settings" href="#edit-settings"><i class="anchor-icon"></i></a>Edit settings</h4>
<p>The remaining commands are pretty self-explanatory:</p>
<ul>
<li><strong>/setname</strong> – change your bot's name.</li>
<li><strong>/setdescription</strong> — changes the bot's <strong>description</strong>, a short text of up to 512 characters, describing your bot. Users will see this text at the beginning of the conversation with the bot, titled ‘What can this bot do?’.</li>
<li><strong>/setabouttext</strong> — changes the bot's <strong>about info</strong>, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text will be sent together with the link.</li>
<li><strong>/setuserpic</strong> — changes the bot‘s profile pictures. It’s always nice to put a face to a name.</li>
<li><strong>/setcommands</strong> — changes the list of commands supported by your bot.  Each command has a name (must start with a slash ‘/’, alphanumeric plus underscores, no more than 32 characters, case-insensitive), parameters, and a text description. Users will see the list of commands whenever they type ‘/’ in a conversation with your bot.</li>
<li><strong>/setjoingroups</strong> — determines whether your bot can be added to groups or not. Any bot must be able to process private messages, but if your bot was not designed to work in groups, you can disable this.</li>
<li><strong>/setprivacy</strong> — determines which messages your bot will receive when added to a group. With privacy mode disabled, the bot will receive all messages. We recommend leaving <a href="#privacy-mode">privacy mode</a> enabled.</li>
<li><strong>/deletebot</strong> — deletes your bot and frees its username.</li>
</ul>
<blockquote>
<p>Please note, that it may take <strong>a few minutes</strong> for changes to take effect.</p>
</blockquote>
<hr>
<p>That's it for the introduction, you are now definitely ready to proceed to the <a href="/bots/api"><strong>BOT API MANUAL</strong></a>.</p>
<p>If you've got any questions, please check out our <a href="/bots/faq"><strong>Bot FAQ »</strong></a></p>
</div>

</div>

        </div>
      </div>
      <div class="footer_wrap">
  <div class="footer_columns_wrap clearfix 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/press">Press</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="//telegram.org/dl/tdesktop">PC/Mac/Linux</a></li>
        <li><a href="//telegram.org/dl/osx">Mac OS</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="/mtproto">Protocol</a></li>
        <li><a href="/schema">Schema</a></li>
      </ul>
    </div>
  </div>
  <div class="footer_columns_wrap clearfix 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?18"></script>
    <script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
    <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-45099287-1', 'telegram.org');
ga('send', 'pageview');initDevPageNav();
backToTopInit();
</script>
  </body>
</html>
<!-- page generated in 3.89ms -->
]"

There will be errors when working with the API, and they must be correctly handled on the client.
An error is characterized by several parameters:

Error Code

Numerical value similar to HTTP status. Contains information on the type of error that occurred: for example, a data input error, privacy error, or server error. This is a required parameter.

Error Type

A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED. This is an optional parameter.

Error Database

A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:

  • errors — All error messages and codes for each method (object).
    • Keys: Error codes as strings (numeric strings)
    • Values: All error messages for each method (object)
      • Keys: Error messages (string)
      • Values: An array of methods which may emit this error (array of strings)
  • descriptions — Descriptions for every error mentioned in errors (and a few other errors not related to a specific method)
    • Keys: Error messages
    • Values: Error descriptions
  • user_only — A list of methods that can only be used by users, not bots.

Error messages and error descriptions may contain printf placeholders in key positions, for now only %d is used to map durations contained in error messages to error descriptions.

Example:

{
    "errors": {
        "420": {
            "2FA_CONFIRM_WAIT_%d": [
                "account.deleteAccount"
            ],
            "SLOWMODE_WAIT_%d": [
                "messages.forwardMessages",
                "messages.sendInlineBotResult",
                "messages.sendMedia",
                "messages.sendMessage",
                "messages.sendMultiMedia"
            ]
        }
    },
    "descriptions": {
        "2FA_CONFIRM_WAIT_%d": "Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds.",
        "SLOWMODE_WAIT_%d": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.",
        "FLOOD_WAIT_%d": "Please wait %d seconds before repeating the action."
    },
    "user_only": {
        "account.deleteAccount"
    }
}

Error Constructors

There should be a way to handle errors that are returned in rpc_error constructors.

Below is a list of error codes and their meanings:

303 SEE_OTHER

The request must be repeated, but directed to a different data center.

Examples of Errors:

  • FILE_MIGRATE_X: the file to be accessed is currently stored in a different data center.
  • PHONE_MIGRATE_X: the phone number a user is trying to use for authorization is associated with a different data center.
  • NETWORK_MIGRATE_X: the source IP address is associated with a different data center (for registration)
  • USER_MIGRATE_X: the user whose identity is being used to execute queries is associated with a different data center (for registration)

In all these cases, the error description’s string literal contains the number of the data center (instead of the X) to which the repeated query must be sent.
More information about redirects between data centers »

400 BAD_REQUEST

The query contains errors. In the event that a request was created using a form and contains user generated data, the user should be notified that the data must be corrected before the query is repeated.

Examples of Errors:

  • FIRSTNAME_INVALID: The first name is invalid
  • LASTNAME_INVALID: The last name is invalid
  • PHONE_NUMBER_INVALID: The phone number is invalid
  • PHONE_CODE_HASH_EMPTY: phone_code_hash is missing
  • PHONE_CODE_EMPTY: phone_code is missing
  • PHONE_CODE_EXPIRED: The confirmation code has expired
  • API_ID_INVALID: The api_id/api_hash combination is invalid
  • PHONE_NUMBER_OCCUPIED: The phone number is already in use
  • PHONE_NUMBER_UNOCCUPIED: The phone number is not yet being used
  • USERS_TOO_FEW: Not enough users (to create a chat, for example)
  • USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
  • TYPE_CONSTRUCTOR_INVALID: The type constructor is invalid
  • FILE_PART_INVALID: The file part number is invalid
  • FILE_PARTS_INVALID: The number of file parts is invalid
  • FILE_PART_X_MISSING: Part X (where X is a number) of the file is missing from storage
  • MD5_CHECKSUM_INVALID: The MD5 checksums do not match
  • PHOTO_INVALID_DIMENSIONS: The photo dimensions are invalid
  • FIELD_NAME_INVALID: The field with the name FIELD_NAME is invalid
  • FIELD_NAME_EMPTY: The field with the name FIELD_NAME is missing
  • MSG_WAIT_FAILED: A request that must be completed before processing the current request returned an error
  • MSG_WAIT_TIMEOUT: A request that must be completed before processing the current request didn’t finish processing yet

401 UNAUTHORIZED

There was an unauthorized attempt to use functionality available only to authorized users.

Examples of Errors:

  • AUTH_KEY_UNREGISTERED: The key is not registered in the system
  • AUTH_KEY_INVALID: The key is invalid
  • USER_DEACTIVATED: The user has been deleted/deactivated
  • SESSION_REVOKED: The authorization has been invalidated, because of the user terminating all sessions
  • SESSION_EXPIRED: The authorization has expired
  • AUTH_KEY_PERM_EMPTY: The method is unavailable for temporary authorization key, not bound to permanent

403 FORBIDDEN

Privacy violation. For example, an attempt to write a message to someone who has blacklisted the current user.

404 NOT_FOUND

An attempt to invoke a non-existent object, such as a method.

406 NOT_ACCEPTABLE

Similar to 400 BAD_REQUEST, but the app must display the error to the user a bit differently.
Do not display any visible error to the user when receiving the rpc_error constructor: instead, wait for an updateServiceNotification update, and handle it as usual.
Basically, an updateServiceNotification popup update will be emitted independently (ie NOT as an Updates constructor inside rpc_result but as a normal update) immediately after emission of a 406 rpc_error: the update will contain the actual localized error message to show to the user with a UI popup.

An exception to this is the AUTH_KEY_DUPLICATED error, which is only emitted if any of the non-media DC detects that an authorized session is sending requests in parallel from two separate TCP connections, from the same or different IP addresses.
Note that parallel connections are still allowed and actually recommended for media DCs.
Also note that by session we mean a logged-in session identified by an authorization constructor, fetchable using account.getAuthorizations, not an MTProto session.

If the client receives an AUTH_KEY_DUPLICATED error, the session is already invalidated by the server and the user must generate a new auth key and login again.

420 FLOOD

The maximum allowed number of attempts to invoke the given method with the given input parameters has been exceeded. For example, in an attempt to request a large number of text messages (SMS) for the same phone number.

Error Example:

  • FLOOD_WAIT_X: A wait of X seconds is required (where X is a number)

500 INTERNAL

An internal server error occurred while a request was being processed; for example, there was a disruption while accessing a database or file storage.

If a client receives a 500 error, or you believe this error should not have occurred, please collect as much information as possible about the query and error and send it to the developers.

Other Error Codes

If a server returns an error with a code other than the ones listed above, it may be considered the same as a 500 error and treated as an internal server error.

Home>2021-09-22 04:47

python : Error while writing a bot for telegrams

Error:

$ C: /Users/sorre/AppData/Local/Programs/Python/Python39/python.exe d: /Python/IlyaSamaelLondony1Bot/main.py
2021-09-22 20: 49: 37,567 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 37,899 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 38,461 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 39,535 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 41,605 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 45,676 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 49: 53,749 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 50: 09,815 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"
2021-09-22 20: 50: 41,880 (__init__.py:653 MainThread) ERROR -TeleBot: "A request to the Telegram API was unsuccessful. Error code: 401. Description: Unauthorized"

Code:

import config
import telebot
bot= telebot.TeleBot (config.token)
@ bot.message_handler (commands= ['start', 'help'])
def send_welcome (message):
    bot.send_message (message.chat.id, "Hello" + message.from_user.first_name + "+ message.from_user.last_name +" I'm a bot! ")
if __name__== '__main__':
    bot.polling (none_stop= True) ,

Related questions

  • python : TypeError: object of type ‘function’ has no len()
  • python : How to send array to telegram?
  • Telegram Bot How to handle button click? c#
  • How to randomly open photos in Telegram Bot in Python?
  • python : Bot not sending message to PM (Discord.py)
  • python : How to embed an image in a message with text for telegram
  • python discord bot not responding to commands
  • python : Sending PIL.Image image as document via pyTelegramBotApi
  • python : Discord music bot
  • python : Bot gives error: missing 1 required positional argument: ‘member’

В данной статье собраны ошибки, возвращаемые API Telegram. Числовое значение аналогично статусу HTTP. Содержит информацию о типе возникшей ошибки: например, ошибка ввода данных, ошибка конфиденциальности или ошибка сервера.

Telegram API Error - вернулась ошибка после отправки запроса к API

303 SEE_OTHER

Запрос необходимо повторить, но направить в другой центр обработки данных.

Примеры ошибок:

  • FILE_MIGRATE_X: файл, к которому нужно получить доступ, в настоящее время хранится в другом центре обработки данных.
  • PHONE_MIGRATE_X: номер телефона, который пользователь пытается использовать для авторизации, связан с другим центром обработки данных.
  • NETWORK_MIGRATE_X: исходный IP-адрес связан с другим центром обработки данных (для регистрации)
  • USER_MIGRATE_X: пользователь, личность которого используется для выполнения запросов, связан с другим центром обработки данных (для регистрации)

Во всех этих случаях строковый литерал описания ошибки содержит номер центра обработки данных (вместо X), в который должен быть отправлен повторный запрос.

ОШИБКА 400, НЕВЕРНЫЙ ЗАПРОС

Запрос содержит ошибки. В случае, если запрос был создан с использованием формы и содержит данные, созданные пользователем, пользователь должен быть уведомлен о том, что данные должны быть исправлены, прежде чем запрос будет повторен.

Примеры ошибок:

  • FIRSTNAME_INVALID: имя недействительно
  • LASTNAME_INVALID: фамилия недействительна
  • PHONE_NUMBER_INVALID: номер телефона недействителен
  • PHONE_CODE_HASH_EMPTY: phone_code_hash отсутствует
  • PHONE_CODE_EMPTY: phone_code отсутствует
  • PHONE_CODE_EXPIRED: срок действия кода подтверждения истек
  • API_ID_INVALID: комбинация api_id / api_hash недействительна
  • PHONE_NUMBER_OCCUPIED: номер телефона уже используется
  • PHONE_NUMBER_UNOCCUPIED: номер телефона еще не используется
  • USERS_TOO_FEW: недостаточно пользователей (например, для создания чата)
  • USERS_TOO_MUCH: превышено максимальное количество пользователей (например, для создания чата)
  • TYPE_CONSTRUCTOR_INVALID: конструктор типа недействителен
  • FILE_PART_INVALID: неверный номер части файла.
  • FILE_PARTS_INVALID: недопустимое количество частей файла.
  • FILE_PART_Х_MISSING: часть X (где X — номер) файла отсутствует в хранилище
  • MD5_CHECKSUM_INVALID: контрольные суммы MD5 не совпадают
  • PHOTO_INVALID_DIMENSIONS: размеры фотографии недействительны
  • FIELD_NAME_INVALID: поле с именем FIELD_NAME недействительно
  • FIELD_NAME_EMPTY: поле с названием FIELD_NAME отсутствует
  • MSG_WAIT_FAILED: запрос, который должен быть выполнен перед обработкой текущего запроса, возвратил ошибку
  • MSG_WAIT_TIMEOUT: запрос, который должен быть выполнен перед обработкой текущего запроса, еще не завершил обработку

401 ОШИБКА ДОСТУПА

Произошла попытка несанкционированного использования функций, доступных только авторизованным пользователям.

Примеры ошибок:

  • AUTH_KEY_UNRIGN: Ключ не зарегистрирован в системе
  • AUTH_KEY_INVALID: ключ недействителен
  • USER_DEACTIVATED: пользователь удален / деактивирован
  • SESSION_REVOKED: авторизация была аннулирована из-за того, что пользователь завершил все сеансы
  • SESSION_EXPIRED: срок авторизации истек
  • AUTH_KEY_PERM_EMPTY: метод недоступен для временного ключа авторизации, не привязан к постоянному

403 ЗАПРЕЩЕНО

Нарушение конфиденциальности. Например, попытка написать сообщение кому-то, кто занес текущего пользователя в черный список.

404 НЕ НАЙДЕНО

Попытка вызвать несуществующий объект, например метод.

406 NOT_ACCEPTABLE

Подобно 400 BAD_REQUEST , но приложение не должно отображать сообщения об ошибках для пользователя в пользовательском интерфейсе в результате этого ответа. Вместо этого сообщение об ошибке будет доставлено через updateServiceNotification.

420 FLOOD

Превышено максимально допустимое количество попыток вызвать данный метод с заданными входными параметрами. Например, при попытке запросить большое количество текстовых сообщений (SMS) на один и тот же номер телефона.

Пример ошибки:

  • FLOOD_WAIT_X: требуется ожидание X секунд (где X — число)

500 ВНУТРЕННИЙ

Произошла внутренняя ошибка сервера во время обработки запроса; например, произошел сбой при доступе к базе данных или файловому хранилищу.

Если клиент получает ошибку 500 или вы считаете, что эта ошибка не должна была возникнуть, пожалуйста, соберите как можно больше информации о запросе и ошибке и отправьте ее разработчикам.

Другие коды ошибок

Если сервер возвращает ошибку с кодом, отличным от перечисленных выше, это может рассматриваться как ошибка 500 и рассматриваться как внутренняя ошибка сервера.

Alberto

bot.command([‘inversion’,’inversiones’,’Inversion’,’Inversiones’], (ctx) => {
//Para poner botones y el extra de parse HTML
ctx.telegram.sendMessage(ctx.chat.id,'<i>Estamos en</i> <b>construccion</b>’,
{
reply_markup:{
inline_keyboard:[
//fila 1
[{text:»1″, url:»www.google.com»}],
//fila 2
[{text:»2″, url:»www.mediavida.com»},
{text:»3″, url:»www.google.com»},],
//fila 3
[{text:»4″, url:»www.mediavida.com»},
{text:»5″, url:»www.mediavida.com»},
{text:»6″, url:»www.mediavida.com»}],
//fila 4
[{text:»7″, url:»www.mediavida.com»},
{text:»8″, url:»www.mediavida.com»},
{text:»9″, url:»www.mediavida.com»},
{text:»10″, url:»www.mediavida.com»}]
]
},
parse_mode:»HTML»,
})
}

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error 401 no ticket proxmox
  • Error 401 firebase
  • Error 4004 фильтр
  • Error 4003 фильтр
  • Error 4002 clack

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии