Skip to content

Commit

Permalink
fixed providerToken arg
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Nov 4, 2024
1 parent 65ae6a7 commit ac3b39e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Examples/2/SendMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ private async Task SendDocument()
{
// ANCHOR: send-document
await bot.SendDocument(chatId, "https://telegrambots.github.io/book/docs/photo-ara.jpg",
caption: "<b>Ara bird</b>. <i>Source</i>: <a href=\"https://pixabay.com\">Pixabay</a>", parseMode: ParseMode.Html);
"<b>Ara bird</b>. <i>Source</i>: <a href=\"https://pixabay.com\">Pixabay</a>", ParseMode.Html);
// ANCHOR_END: send-document
}

private async Task SendAnimation()
{
// ANCHOR: send-animation
await bot.SendAnimation(chatId, "https://telegrambots.github.io/book/docs/video-waves.mp4",
caption: "Waves");
await bot.SendAnimation(chatId, "https://telegrambots.github.io/book/docs/video-waves.mp4", "Waves");
// ANCHOR_END: send-animation
}

Expand Down Expand Up @@ -134,7 +133,7 @@ private async Task SendPhoto()
{
// ANCHOR: send-photo
var message = await bot.SendPhoto(chatId, "https://telegrambots.github.io/book/docs/photo-ara.jpg",
caption: "<b>Ara bird</b>. <i>Source</i>: <a href=\"https://pixabay.com\">Pixabay</a>", parseMode: ParseMode.Html);
"<b>Ara bird</b>. <i>Source</i>: <a href=\"https://pixabay.com\">Pixabay</a>", ParseMode.Html);
// ANCHOR_END: send-photo
}

Expand All @@ -154,7 +153,7 @@ private async Task SendText()

// ANCHOR: send-text
var message = await bot.SendMessage(chatId, "Trying <b>all the parameters</b> of <code>sendMessage</code> method",
parseMode: ParseMode.Html,
ParseMode.Html,
protectContent: true,
replyParameters: update.Message.Id,
replyMarkup: new InlineKeyboardMarkup(
Expand Down
3 changes: 1 addition & 2 deletions src/4/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ await bot.SendInvoice(
title: "Product Title",
description: "Product Detailed Description",
payload: "InternalProductID", // not sent nor shown to user
providerToken: "" // empty string for XTR
currency: "XTR", // 3-letters ISO 4217 currency
prices: [("Price", 500)], // only one price for XTR
photoUrl: "https://cdn.pixabay.com/photo/2012/10/26/03/16/painting-63186_1280.jpg",
Expand Down Expand Up @@ -116,7 +115,7 @@ async Task OnUpdate(Update update)
{
case { Message.Text: "/start" }:
await bot.SendInvoice(update.Message.Chat,
"Unlock feature X", "Will give you access to feature X of this bot", "unlock_X", "",
"Unlock feature X", "Will give you access to feature X of this bot", "unlock_X",
"XTR", [("Price", 200)], photoUrl: "https://cdn-icons-png.flaticon.com/512/891/891386.png");
break;
case { PreCheckoutQuery: { } preCheckoutQuery }:
Expand Down

0 comments on commit ac3b39e

Please sign in to comment.