Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Jul 19, 2024
1 parent 54315db commit 4bb8ece
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/1/full-bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

On the [previous page](example-bot.md) we got a basic bot reacting to messages via `bot.OnMessage`.

Now, we are going set also `bot.OnUpdate` and `bot.OnError` to make a more complete bot
Now, we are going to set also `bot.OnUpdate` and `bot.OnError` to make a more complete bot

Modify your `Program.cs` to the following:

Expand All @@ -11,6 +11,7 @@ using Telegram.Bot;
using Telegram.Bot.Polling;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.ReplyMarkups;

using var cts = new CancellationTokenSource();
var bot = new TelegramBotClient("YOUR_BOT_TOKEN", cancellationToken: cts.Token);
Expand Down Expand Up @@ -52,7 +53,7 @@ async Task OnUpdate(Update update)

Run the program and send `/start` to the bot.
> [!NOTE]
> `/start` is the first message your bot receives automatically when a user interact in private with the bot for the first time
> `/start` is the first message your bot receives automatically when a user interacts in private with the bot for the first time
The bot will reply with its welcome message and 2 inline buttons for you to choose.

Expand Down

0 comments on commit 4bb8ece

Please sign in to comment.