You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary><em>Optional</em>. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.</summary>
227
+
[Obsolete("Use CorrectOptionIds instead")]
228
+
publicint?CorrectOptionId
229
+
{
230
+
get=>CorrectOptionIdsswitch{null or []=>null,[intvalue]=>value, _ =>thrownewInvalidOperationException("Multiple CorrectOptionIds")};
Copy file name to clipboardExpand all lines: src/Telegram.Bot/Requests/Gifts/SendGiftRequest.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,11 @@ public partial class SendGiftRequest() : RequestBase<bool>("sendGift")
25
25
/// <summary>Text that will be shown along with the gift; 0-128 characters</summary>
26
26
publicstring?Text{get;set;}
27
27
28
-
/// <summary>Mode for parsing entities in the text. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, and <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see> are ignored.</summary>
28
+
/// <summary>Mode for parsing entities in the text. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see>, and <see cref="MessageEntityType.DateTime">DateTime</see> are ignored.</summary>
29
29
[JsonPropertyName("text_parse_mode")]
30
30
publicParseModeTextParseMode{get;set;}
31
31
32
-
/// <summary>A list of special entities that appear in the gift text. It can be specified instead of <see cref="TextParseMode">TextParseMode</see>. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, and <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see> are ignored.</summary>
32
+
/// <summary>A list of special entities that appear in the gift text. It can be specified instead of <see cref="TextParseMode">TextParseMode</see>. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see>, and <see cref="MessageEntityType.DateTime">DateTime</see> are ignored.</summary>
/// <summary>Use this method to revoke the current token of a managed bot and generate a new one.<para>Returns: The new token as <em>String</em> on success.</para></summary>
/// <summary>Stores a keyboard button that can be used by a user within a Mini App.<para>Returns: A <see cref="PreparedKeyboardButton"/> object.</para></summary>
/// <summary>Unique identifier of the target user that can use the button</summary>
9
+
[JsonPropertyName("user_id")]
10
+
[JsonIgnore(Condition=JsonIgnoreCondition.Never)]
11
+
publicrequiredlongUserId{get;set;}
12
+
13
+
/// <summary>An object describing the button to be saved. The button must be of the type <em>RequestUsers</em>, <em>RequestChat</em>, or <em>RequestManagedBot</em></summary>
Copy file name to clipboardExpand all lines: src/Telegram.Bot/Requests/Payments/GiftPremiumSubscriptionRequest.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ public partial class GiftPremiumSubscriptionRequest() : RequestBase<bool>("giftP
23
23
/// <summary>Text that will be shown along with the service message about the subscription; 0-128 characters</summary>
24
24
publicstring?Text{get;set;}
25
25
26
-
/// <summary>Mode for parsing entities in the text. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, and <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see> are ignored.</summary>
26
+
/// <summary>Mode for parsing entities in the text. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. Entities other than <see cref="MessageEntityType.Bold">Bold</see>, <see cref="MessageEntityType.Italic">Italic</see>, <see cref="MessageEntityType.Underline">Underline</see>, <see cref="MessageEntityType.Strikethrough">Strikethrough</see>, <see cref="MessageEntityType.Spoiler">Spoiler</see>, <see cref="MessageEntityType.CustomEmoji">CustomEmoji</see>, and <see cref="MessageEntityType.DateTime">DateTime</see> are ignored.</summary>
27
27
[JsonPropertyName("text_parse_mode")]
28
28
publicParseModeTextParseMode{get;set;}
29
29
30
-
/// <summary>A list of special entities that appear in the gift text. It can be specified instead of <see cref="TextParseMode">TextParseMode</see>. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “CustomEmoji” are ignored.</summary>
30
+
/// <summary>A list of special entities that appear in the gift text. It can be specified instead of <see cref="TextParseMode">TextParseMode</see>. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “CustomEmoji”, and “DateTime” are ignored.</summary>
Copy file name to clipboardExpand all lines: src/Telegram.Bot/Requests/Sending Messages/SendPollRequest.cs
+33-6Lines changed: 33 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,29 @@ public partial class SendPollRequest() : RequestBase<Message>("sendPoll"), IChat
41
41
/// <summary>Poll type, <see cref="PollType.Quiz">Quiz</see> or <see cref="PollType.Regular">Regular</see>, defaults to <see cref="PollType.Regular">Regular</see></summary>
42
42
publicPollType?Type{get;set;}
43
43
44
-
/// <summary><see langword="true"/>, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to <see langword="false"/></summary>
44
+
/// <summary>Pass <see langword="true"/>, if the poll allows multiple answers, defaults to <see langword="false"/></summary>
45
45
[JsonPropertyName("allows_multiple_answers")]
46
46
publicboolAllowsMultipleAnswers{get;set;}
47
47
48
-
/// <summary>0-based identifier of the correct answer option, required for polls in quiz mode</summary>
49
-
[JsonPropertyName("correct_option_id")]
50
-
publicint?CorrectOptionId{get;set;}
48
+
/// <summary>Pass <see langword="true"/>, if the poll allows to change chosen answer options, defaults to <see langword="false"/> for quizzes and to <see langword="true"/> for regular polls</summary>
49
+
[JsonPropertyName("allows_revoting")]
50
+
publicboolAllowsRevoting{get;set;}
51
+
52
+
/// <summary>Pass <see langword="true"/>, if the poll options must be shown in random order</summary>
53
+
[JsonPropertyName("shuffle_options")]
54
+
publicboolShuffleOptions{get;set;}
55
+
56
+
/// <summary>Pass <see langword="true"/>, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes</summary>
57
+
[JsonPropertyName("allow_adding_options")]
58
+
publicboolAllowAddingOptions{get;set;}
59
+
60
+
/// <summary>Pass <see langword="true"/>, if poll results must be shown only after the poll closes</summary>
61
+
[JsonPropertyName("hide_results_until_closes")]
62
+
publicboolHideResultsUntilCloses{get;set;}
63
+
64
+
/// <summary>A list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode</summary>
65
+
[JsonPropertyName("correct_option_ids")]
66
+
publicIEnumerable<int>?CorrectOptionIds{get;set;}
51
67
52
68
/// <summary>Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing</summary>
53
69
publicstring?Explanation{get;set;}
@@ -60,11 +76,11 @@ public partial class SendPollRequest() : RequestBase<Message>("sendPoll"), IChat
/// <summary>Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with <see cref="CloseDate">CloseDate</see>.</summary>
79
+
/// <summary>Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with <see cref="CloseDate">CloseDate</see>.</summary>
64
80
[JsonPropertyName("open_period")]
65
81
publicint?OpenPeriod{get;set;}
66
82
67
-
/// <summary>Point in time when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with <see cref="OpenPeriod">OpenPeriod</see>.</summary>
83
+
/// <summary>Point in time when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with <see cref="OpenPeriod">OpenPeriod</see>.</summary>
68
84
[JsonPropertyName("close_date")]
69
85
[JsonConverter(typeof(UnixDateTimeConverter))]
70
86
publicDateTime?CloseDate{get;set;}
@@ -73,6 +89,17 @@ public partial class SendPollRequest() : RequestBase<Message>("sendPoll"), IChat
73
89
[JsonPropertyName("is_closed")]
74
90
publicboolIsClosed{get;set;}
75
91
92
+
/// <summary>Description of the poll to be sent, 0-1024 characters after entities parsing</summary>
93
+
publicstring?Description{get;set;}
94
+
95
+
/// <summary>Mode for parsing entities in the poll description. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.</summary>
96
+
[JsonPropertyName("description_parse_mode")]
97
+
publicParseModeDescriptionParseMode{get;set;}
98
+
99
+
/// <summary>A list of special entities that appear in the poll description, which can be specified instead of <see cref="DescriptionParseMode">DescriptionParseMode</see></summary>
/// <summary>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</summary>
0 commit comments