public static async Task <Message> SendVideoAsync(this BotClient api, long chatId, InputFile video, [Optional] uint?duration, [Optional] uint?width, [Optional] uint?height, [Optional] InputFile?thumb, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] bool?supportsStreaming, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup, [Optional] CancellationToken cancellationToken) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendVideoArgs(chatId, video) { Duration = duration, Width = width, Height = height, Thumb = thumb, Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, SupportsStreaming = supportsStreaming, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(await api.RPCAF <Message>(MethodNames.SendVideo, args, cancellationToken).ConfigureAwait(false)); }
public static Message SendVoice(this BotClient api, long chatId, InputFile voice, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] uint?duration, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendVoiceArgs(chatId, voice) { Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, Duration = duration, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(api.RPCF <Message>(MethodNames.SendVoice, args)); }
public static Message SendVideo(this BotClient api, string chatId, string video, [Optional] uint?duration, [Optional] uint?width, [Optional] uint?height, [Optional] string?thumb, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] bool?supportsStreaming, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup, [Optional] IEnumerable <AttachedFile>?attachedFiles) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendVideoArgs(chatId, video) { Duration = duration, Width = width, Height = height, Thumb = thumb, Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, SupportsStreaming = supportsStreaming, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup, AttachedFiles = attachedFiles == null ? new List <AttachedFile>() : new List <AttachedFile>(attachedFiles) }; return(api.RPCF <Message>(MethodNames.SendVideo, args)); }
public static async Task <Message> SendVoiceAsync(this BotClient api, string chatId, string voice, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] uint?duration, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup, [Optional] CancellationToken cancellationToken) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendVoiceArgs(chatId, voice) { Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, Duration = duration, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(await api.RPCAF <Message>(MethodNames.SendVoice, args, cancellationToken).ConfigureAwait(false)); }
public static async Task <Message> SendAnimationAsync(this BotClient api, string chatId, string animation, [Optional] uint?duration, [Optional] uint?width, [Optional] uint?height, [Optional] string?thumb, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup, [Optional] IEnumerable <AttachedFile>?attachedFiles, [Optional] CancellationToken cancellationToken) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendAnimationArgs(chatId, animation) { Duration = duration, Width = width, Height = height, Thumb = thumb, Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup, AttachedFiles = attachedFiles == null ? new List <AttachedFile>() : new List <AttachedFile>(attachedFiles) }; return(await api.RPCAF <Message>(MethodNames.SendAnimation, args, cancellationToken).ConfigureAwait(false)); }
public static Message SendAnimation(this BotClient api, string chatId, InputFile animation, [Optional] uint?duration, [Optional] uint?width, [Optional] uint?height, [Optional] InputFile?thumb, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendAnimationArgs(chatId, animation) { Duration = duration, Width = width, Height = height, Thumb = thumb, Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(api.RPCF <Message>(MethodNames.SendAnimation, args)); }
public static Message SendDocument(this BotClient api, string chatId, string document, [Optional] string?thumb, [Optional] string?caption, [Optional] string?parseMode, [Optional] IEnumerable <MessageEntity>?captionEntities, [Optional] bool?disableContentTypeDetection, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup, [Optional] IEnumerable <AttachedFile>?attachedFiles) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendDocumentArgs(chatId, document) { Thumb = thumb, Caption = caption, ParseMode = parseMode, CaptionEntities = captionEntities, DisableContentTypeDetection = disableContentTypeDetection, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup, AttachedFiles = attachedFiles == null ? new List <AttachedFile>() : new List <AttachedFile>(attachedFiles) }; return(api.RPCF <Message>(MethodNames.SendDocument, args)); }
public static Message SendVenue(this BotClient api, long chatId, float latitude, float longitude, string title, string address, [Optional] string?foursquareId, [Optional] string?foursquareType, [Optional] string?googlePlaceId, [Optional] string?googlePlaceType, [Optional] bool?disableNotification, [Optional] bool?protectContent, [Optional] int?replyToMessageId, [Optional] bool?allowSendingWithoutReply, [Optional] ReplyMarkup?replyMarkup) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new SendVenueArgs(chatId, latitude, longitude, title, address) { FoursquareId = foursquareId, FoursquareType = foursquareType, GooglePlaceId = googlePlaceId, GooglePlaceType = googlePlaceType, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(api.RPC <Message>(MethodNames.SendVenue, args)); }