Skip to content

Commit

Permalink
clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Sep 2, 2024
1 parent 25a0336 commit 1551628
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/3/updates/webhook.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Webhooks
# Webhooks

[![Webhook guide](https://img.shields.io/badge/Bot_API-Webhook%20guide-blue.svg?style=flat-square)](https://core.telegram.org/bots/webhooks)

Expand All @@ -8,6 +8,8 @@ Your application will receive HTTP POST requests with an Update structure in the

Below, you will find how to configure an **ASP.NET Core Web API** project to make it work with Telegram.Bot, either with Controllers or Minimal APIs

⚠️ IMPORTANT: This guide describes configuration for versions 21.* of the library _(based on System.Text.Json rather than NewtonsoftJson)_. If you're using older versions, [you should upgrade first](../../migrate/Version-21.x.md)!

## ASP.NET Core with Controllers (MVC)
[![ASP.NET example with Controllers](https://img.shields.io/badge/Examples-Webhook.Controllers-green?style=flat-square)](https://github.com/TelegramBots/Telegram.Bot.Examples/tree/master/Webhook.Controllers)

Expand Down
6 changes: 3 additions & 3 deletions src/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ If you didn't record that info, you can try to `SendChatActionAsync` and see if
Set the `media.Caption` (and `media.ParseMode`) on the first media

### _13. How to write a bot that make questions/answers with users?_
Either you can code a complex state machine workflow, saving where each user is currently in the discussion.
Either you can code a complex state machine workflow, saving where each user is currently in the discussion tree.
Or you can just use [YourEasyBot](https://github.com/wiz0u/YourEasyBot) which makes sequential bots very simple to write... _(or one of the [other frameworks](https://github.com/TelegramBots/Telegram.Bot/wiki) available for Telegram.Bot)_

### _14. How to make font effects in message?_
Expand All @@ -85,7 +85,7 @@ See <https://limits.tginfo.me> for a list of limitations.

### _17. How to populate the bot Menu button / commands list?_
You can either do this via [@BotFather](https://t.me/BotFather) _(static entries)_, or you can use `SetMyCommandsAsync` for more advanced settings
⚠️ This can only be filled with bot commands, starting with a `/` and containing only latin characters `a-z_0-9`
⚠️ This menu can only be filled with bot commands, starting with a `/` and containing only latin characters `a-z_0-9`

### _18. How to receive `ChatMember` updates?_
You should specify all update types **including ChatMember** in `AllowedUpdates` array on `StartReceiving`:`ReceiverOptions` or `SetWebhookAsync`
Expand All @@ -103,7 +103,7 @@ Alternatively, you can call `await bot.DropPendingUpdatesAsync()` before polling
Medias in a media group are received as separate consecutive messages having the same `MediaGroupId` property. You should collect them progressively as you receive those messages.
There is no way to know how many medias are in the album, so:
- look for consecutive messages in that chat with same `MediaGroupId` and stop when it's not the same
- stop after 10 media in the group (maximum)
- stop after 10 medias in the group (maximum)
- use a timeout of a few seconds not receiving new messages in that chat to determine the end

### _22. How to send a custom emoji❓_
Expand Down

0 comments on commit 1551628

Please sign in to comment.