Skip to content

Commit

Permalink
deploy: 1551628
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Sep 2, 2024
1 parent a8f3a8d commit 163ed23
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions 3/updates/webhook.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ <h1 id="webhooks"><a class="header" href="#webhooks">Webhooks</a></h1>
<p>With Webhook, your web application gets notified automatically by Telegram when new updates arrive for your bot.</p>
<p>Your application will receive HTTP POST requests with an Update structure in the body, using specific JSON serialization settings <code>Telegram.Bot.JsonBotAPI.Options</code>.</p>
<p>Below, you will find how to configure an <strong>ASP.NET Core Web API</strong> project to make it work with Telegram.Bot, either with Controllers or Minimal APIs</p>
<p>⚠️ IMPORTANT: This guide describes configuration for versions 21.* of the library <em>(based on System.Text.Json rather than NewtonsoftJson)</em>. If you're using older versions, <a href="../../migrate/Version-21.x.html">you should upgrade first</a>!</p>
<h2 id="aspnet-core-with-controllers-mvc"><a class="header" href="#aspnet-core-with-controllers-mvc">ASP.NET Core with Controllers (MVC)</a></h2>
<p><a href="https://github.com/TelegramBots/Telegram.Bot.Examples/tree/master/Webhook.Controllers"><img src="https://img.shields.io/badge/Examples-Webhook.Controllers-green?style=flat-square" alt="ASP.NET example with Controllers" /></a></p>
<p>First you need to configure your Web App startup code:</p>
Expand Down
6 changes: 3 additions & 3 deletions FAQ.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ <h3 id="11-how-to-detect-if-a-user-blocked-my-bot"><a class="header" href="#11-h
<h3 id="12-how-to-set-a-caption-to-a-media-group-album"><a class="header" href="#12-how-to-set-a-caption-to-a-media-group-album"><em>12. How to set a caption to a media group (album)?</em></a></h3>
<p>Set the <code>media.Caption</code> (and <code>media.ParseMode</code>) on the first media</p>
<h3 id="13-how-to-write-a-bot-that-make-questionsanswers-with-users"><a class="header" href="#13-how-to-write-a-bot-that-make-questionsanswers-with-users"><em>13. How to write a bot that make questions/answers with users?</em></a></h3>
<p>Either you can code a complex state machine workflow, saving where each user is currently in the discussion.<br />
<p>Either you can code a complex state machine workflow, saving where each user is currently in the discussion tree.<br />
Or you can just use <a href="https://github.com/wiz0u/YourEasyBot">YourEasyBot</a> which makes sequential bots very simple to write... <em>(or one of the <a href="https://github.com/TelegramBots/Telegram.Bot/wiki">other frameworks</a> available for Telegram.Bot)</em></p>
<h3 id="14-how-to-make-font-effects-in-message"><a class="header" href="#14-how-to-make-font-effects-in-message"><em>14. How to make font effects in message?</em></a></h3>
<p>Pass a <code>ParseMode.Html</code> <em>(or <code>ParseMode.MarkDownV2</code>)</em> to argument <code>parseMode</code>. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a>.<br />
Expand All @@ -354,7 +354,7 @@ <h3 id="16-is-there-some-limitationmaximum-about-feature-x"><a class="header" hr
<p>See <a href="https://limits.tginfo.me">https://limits.tginfo.me</a> for a list of limitations.</p>
<h3 id="17-how-to-populate-the-bot-menu-button--commands-list"><a class="header" href="#17-how-to-populate-the-bot-menu-button--commands-list"><em>17. How to populate the bot Menu button / commands list?</em></a></h3>
<p>You can either do this via <a href="https://t.me/BotFather">@BotFather</a> <em>(static entries)</em>, or you can use <code>SetMyCommandsAsync</code> for more advanced settings<br />
⚠️ This can only be filled with bot commands, starting with a <code>/</code> and containing only latin characters <code>a-z_0-9</code></p>
⚠️ This menu can only be filled with bot commands, starting with a <code>/</code> and containing only latin characters <code>a-z_0-9</code></p>
<h3 id="18-how-to-receive-chatmember-updates"><a class="header" href="#18-how-to-receive-chatmember-updates"><em>18. How to receive <code>ChatMember</code> updates?</em></a></h3>
<p>You should specify all update types <strong>including ChatMember</strong> in <code>AllowedUpdates</code> array on <code>StartReceiving</code>:<code>ReceiverOptions</code> or <code>SetWebhookAsync</code></p>
<h3 id="19-how-to-get-rid-of-past-updates-when-i-restart-my-bot"><a class="header" href="#19-how-to-get-rid-of-past-updates-when-i-restart-my-bot"><em>19. How to get rid of past updates when I restart my bot?</em></a></h3>
Expand All @@ -371,7 +371,7 @@ <h3 id="21-how-to-fetch-all-medias-from-an-albummedia-group-"><a class="header"
There is no way to know how many medias are in the album, so:</p>
<ul>
<li>look for consecutive messages in that chat with same <code>MediaGroupId</code> and stop when it's not the same</li>
<li>stop after 10 media in the group (maximum)</li>
<li>stop after 10 medias in the group (maximum)</li>
<li>use a timeout of a few seconds not receiving new messages in that chat to determine the end</li>
</ul>
<h3 id="22-how-to-send-a-custom-emoji"><a class="header" href="#22-how-to-send-a-custom-emoji"><em>22. How to send a custom emoji❓</em></a></h3>
Expand Down
7 changes: 4 additions & 3 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,7 @@ <h1 id="webhooks"><a class="header" href="#webhooks">Webhooks</a></h1>
<p>With Webhook, your web application gets notified automatically by Telegram when new updates arrive for your bot.</p>
<p>Your application will receive HTTP POST requests with an Update structure in the body, using specific JSON serialization settings <code>Telegram.Bot.JsonBotAPI.Options</code>.</p>
<p>Below, you will find how to configure an <strong>ASP.NET Core Web API</strong> project to make it work with Telegram.Bot, either with Controllers or Minimal APIs</p>
<p>⚠️ IMPORTANT: This guide describes configuration for versions 21.* of the library <em>(based on System.Text.Json rather than NewtonsoftJson)</em>. If you're using older versions, <a href="3/updates/../../migrate/Version-21.x.html">you should upgrade first</a>!</p>
<h2 id="aspnet-core-with-controllers-mvc"><a class="header" href="#aspnet-core-with-controllers-mvc">ASP.NET Core with Controllers (MVC)</a></h2>
<p><a href="https://github.com/TelegramBots/Telegram.Bot.Examples/tree/master/Webhook.Controllers"><img src="https://img.shields.io/badge/Examples-Webhook.Controllers-green?style=flat-square" alt="ASP.NET example with Controllers" /></a></p>
<p>First you need to configure your Web App startup code:</p>
Expand Down Expand Up @@ -4727,7 +4728,7 @@ <h3 id="11-how-to-detect-if-a-user-blocked-my-bot"><a class="header" href="#11-h
<h3 id="12-how-to-set-a-caption-to-a-media-group-album"><a class="header" href="#12-how-to-set-a-caption-to-a-media-group-album"><em>12. How to set a caption to a media group (album)?</em></a></h3>
<p>Set the <code>media.Caption</code> (and <code>media.ParseMode</code>) on the first media</p>
<h3 id="13-how-to-write-a-bot-that-make-questionsanswers-with-users"><a class="header" href="#13-how-to-write-a-bot-that-make-questionsanswers-with-users"><em>13. How to write a bot that make questions/answers with users?</em></a></h3>
<p>Either you can code a complex state machine workflow, saving where each user is currently in the discussion.<br />
<p>Either you can code a complex state machine workflow, saving where each user is currently in the discussion tree.<br />
Or you can just use <a href="https://github.com/wiz0u/YourEasyBot">YourEasyBot</a> which makes sequential bots very simple to write... <em>(or one of the <a href="https://github.com/TelegramBots/Telegram.Bot/wiki">other frameworks</a> available for Telegram.Bot)</em></p>
<h3 id="14-how-to-make-font-effects-in-message"><a class="header" href="#14-how-to-make-font-effects-in-message"><em>14. How to make font effects in message?</em></a></h3>
<p>Pass a <code>ParseMode.Html</code> <em>(or <code>ParseMode.MarkDownV2</code>)</em> to argument <code>parseMode</code>. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a>.<br />
Expand All @@ -4741,7 +4742,7 @@ <h3 id="16-is-there-some-limitationmaximum-about-feature-x"><a class="header" hr
<p>See <a href="https://limits.tginfo.me">https://limits.tginfo.me</a> for a list of limitations.</p>
<h3 id="17-how-to-populate-the-bot-menu-button--commands-list"><a class="header" href="#17-how-to-populate-the-bot-menu-button--commands-list"><em>17. How to populate the bot Menu button / commands list?</em></a></h3>
<p>You can either do this via <a href="https://t.me/BotFather">@BotFather</a> <em>(static entries)</em>, or you can use <code>SetMyCommandsAsync</code> for more advanced settings<br />
⚠️ This can only be filled with bot commands, starting with a <code>/</code> and containing only latin characters <code>a-z_0-9</code></p>
⚠️ This menu can only be filled with bot commands, starting with a <code>/</code> and containing only latin characters <code>a-z_0-9</code></p>
<h3 id="18-how-to-receive-chatmember-updates"><a class="header" href="#18-how-to-receive-chatmember-updates"><em>18. How to receive <code>ChatMember</code> updates?</em></a></h3>
<p>You should specify all update types <strong>including ChatMember</strong> in <code>AllowedUpdates</code> array on <code>StartReceiving</code>:<code>ReceiverOptions</code> or <code>SetWebhookAsync</code></p>
<h3 id="19-how-to-get-rid-of-past-updates-when-i-restart-my-bot"><a class="header" href="#19-how-to-get-rid-of-past-updates-when-i-restart-my-bot"><em>19. How to get rid of past updates when I restart my bot?</em></a></h3>
Expand All @@ -4758,7 +4759,7 @@ <h3 id="21-how-to-fetch-all-medias-from-an-albummedia-group-"><a class="header"
There is no way to know how many medias are in the album, so:</p>
<ul>
<li>look for consecutive messages in that chat with same <code>MediaGroupId</code> and stop when it's not the same</li>
<li>stop after 10 media in the group (maximum)</li>
<li>stop after 10 medias in the group (maximum)</li>
<li>use a timeout of a few seconds not receiving new messages in that chat to determine the end</li>
</ul>
<h3 id="22-how-to-send-a-custom-emoji"><a class="header" href="#22-how-to-send-a-custom-emoji"><em>22. How to send a custom emoji❓</em></a></h3>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit 163ed23

Please sign in to comment.