Added missing XML-Summaries
This commit is contained in:
@@ -11,5 +11,4 @@ TG_1003 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
TG_1004 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
TG_1005 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
TG_1006 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
TG_1007 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
TR0001 | Aspect | Error | DiagnosticsHelper
|
||||
TG_1007 | Modelling | Error | GeneratedKeyboardMarkupGenerator
|
||||
@@ -1,4 +1,5 @@
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.ReplyMarkups;
|
||||
|
||||
namespace Telegrator.Markups
|
||||
@@ -13,24 +14,19 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Data that will be send to bot
|
||||
/// Data to be sent in a <see cref="CallbackQuery">callback query</see> to the bot when the button is pressed, 1-64 bytes
|
||||
/// </summary>
|
||||
public string Data { get; } = data;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="InlineKeyboardButton.WithCallbackGame(string)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public sealed class GameButtonAttribute(string name, string data) : Attribute
|
||||
public sealed class GameButtonAttribute(string name) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Game to open
|
||||
/// </summary>
|
||||
public string Game { get; } = data;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="InlineKeyboardButton.WithCopyText(string, CopyTextButton)"/>
|
||||
@@ -43,7 +39,7 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Text to copy
|
||||
/// Description of the button that copies the specified text to the clipboard.
|
||||
/// </summary>
|
||||
public CopyTextButton CopyText { get; } = copyText;
|
||||
}
|
||||
@@ -68,7 +64,7 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Url of app to login to
|
||||
/// An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the <a href="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.
|
||||
/// </summary>
|
||||
public LoginUrl Url { get; } = url;
|
||||
}
|
||||
@@ -83,7 +79,7 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Url to redirect user
|
||||
/// HTTP or tg:// URL to be opened when the button is pressed. Links <c>tg://user?id=<UserId></c> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.
|
||||
/// </summary>
|
||||
public string Url { get; } = url;
|
||||
}
|
||||
@@ -98,7 +94,7 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Info about mini app to open
|
||||
/// Description of the <a href="https://core.telegram.org/bots/webapps">Web App</a> that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <see cref="TelegramBotClientExtensions.AnswerWebAppQuery">AnswerWebAppQuery</see>. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.
|
||||
/// </summary>
|
||||
public WebAppInfo AppInfo { get; } = webApp;
|
||||
}
|
||||
@@ -111,9 +107,9 @@ namespace Telegrator.Markups
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Query
|
||||
/// If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.
|
||||
/// </summary>
|
||||
public string Query { get; } = switchInlineQuery;
|
||||
}
|
||||
@@ -128,48 +124,83 @@ namespace Telegrator.Markups
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Query
|
||||
/// If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.<br/><br/>This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account.
|
||||
/// </summary>
|
||||
public string Query { get; } = switchInlineQueryCurrentChat;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="KeyboardButton.WithRequestChat(string, int, bool)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class RequestChatButtonAttribute(string name, int requestId, bool chatIsChannel) : Attribute
|
||||
public class RequestChatButtonAttribute(string name, bool chatIsChannel = true) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
|
||||
public int RequestId { get; } = requestId;
|
||||
/// <summary>
|
||||
/// Signed 32-bit identifier of the request that will be received back in the <see cref="UsersShared"/> object. Must be unique within the message
|
||||
/// </summary>
|
||||
public int RequestId { get; } = new Random().Next();
|
||||
|
||||
/// <summary>
|
||||
/// Pass <see langword="true"/> to request a channel chat, pass <see langword="false"/> to request a group or a supergroup chat.
|
||||
/// </summary>
|
||||
public bool ChatIsChannel { get; } = chatIsChannel;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="KeyboardButton.WithRequestContact(string)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class RequestContactButtonAttribute(string name) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="KeyboardButton.WithRequestLocation(string)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class RequestLocationButtonAttribute(string name) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="KeyboardButton.WithRequestPoll(string, KeyboardButtonPollType)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class RequestPoolButtonAttribute(string name, KeyboardButtonPollType requestPoll) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.
|
||||
/// </summary>
|
||||
public KeyboardButtonPollType PollType { get; } = requestPoll;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="KeyboardButton.WithRequestUsers(string, int, int?)"/>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class RequestUsersButtonAttribute(string name, int requestId, int? maxQuantity = null) : Attribute
|
||||
public class RequestUsersButtonAttribute(string name, int? maxQuantity = null) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of button
|
||||
/// </summary>
|
||||
public string Name { get; } = name;
|
||||
|
||||
public int RequestId { get; } = requestId;
|
||||
/// <summary>
|
||||
/// Signed 32-bit identifier of the request that will be received back in the <see cref="UsersShared"/> object. Must be unique within the message
|
||||
/// </summary>
|
||||
public int RequestId { get; } = new Random().Next();
|
||||
|
||||
/// <summary>
|
||||
/// <em>Optional</em>. The maximum number of users to be selected; 1-10. Defaults to 1.
|
||||
/// </summary>
|
||||
public int? MaxQuantity { get; } = maxQuantity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user