Добавлен вывод кнопок для файлов
This commit is contained in:
@@ -11,7 +11,9 @@ public static class PageContextAdapterExtensions
|
||||
/// <summary>
|
||||
/// Отправить текстовое сообщение.
|
||||
/// </summary>
|
||||
public static Task<string?> SendTextAsync(this PageContext ctx, string text, MessageFormat format = MessageFormat.Plain,
|
||||
public static Task<string?> SendTextAsync(this PageContext ctx,
|
||||
string text,
|
||||
MessageFormat format = MessageFormat.Plain,
|
||||
IEnumerable<IEnumerable<InlineButton>>? inline = null,
|
||||
IEnumerable<IEnumerable<ReplyButton>>? reply = null,
|
||||
string? messageId = null,
|
||||
@@ -21,12 +23,19 @@ public static class PageContextAdapterExtensions
|
||||
/// <summary>
|
||||
/// Отправить файл.
|
||||
/// </summary>
|
||||
public static Task SendFileAsync(this PageContext ctx, FileDescriptor file, string? caption = null, MessageFormat? captionFormat = null, CancellationToken ct = default)
|
||||
=> ctx.Adapter.SendFileAsync(ctx.Update.Chat.Id, file, caption, captionFormat, ct);
|
||||
|
||||
/// <summary>
|
||||
/// Отправить файл.
|
||||
/// </summary>
|
||||
public static Task SendFileAsync(this PageContext ctx, FileDescriptor file, string? caption = null, CancellationToken ct = default)
|
||||
=> ctx.Adapter.SendFileAsync(ctx.Update.Chat.Id, file, caption, null, ct);
|
||||
public static Task SendFileAsync(this PageContext ctx,
|
||||
FileDescriptor file,
|
||||
string? caption = null,
|
||||
MessageFormat? captionFormat = null,
|
||||
IEnumerable<IEnumerable<InlineButton>>? inline = null,
|
||||
IEnumerable<IEnumerable<ReplyButton>>? reply = null,
|
||||
CancellationToken ct = default
|
||||
)
|
||||
=> ctx.Adapter.SendFileAsync(chatId: ctx.Update.Chat.Id,
|
||||
file: file,
|
||||
caption: caption,
|
||||
captionFormat: captionFormat,
|
||||
inline: inline,
|
||||
reply: reply,
|
||||
ct: ct);
|
||||
}
|
||||
Reference in New Issue
Block a user