public static async Task <Message> SendVideoNoteAsync(this BotClient bot, SendVideoNoteArgs args, [Optional] CancellationToken cancellationToken) { if (bot == default) { throw new ArgumentNullException(nameof(bot)); } if (args == default) { throw new ArgumentNullException(nameof(args)); } return(await bot.RPCAF <Message>(MethodNames.SendVideoNote, args, cancellationToken : cancellationToken).ConfigureAwait(false)); }
public static Message SendVideoNote(this BotClient bot, SendVideoNoteArgs args) { if (bot == default) { throw new ArgumentNullException(nameof(bot)); } if (args == default) { throw new ArgumentNullException(nameof(args)); } return(bot.RPCF <Message>(MethodNames.SendVideoNote, args)); }
public static Message SendVideoNote(this BotClient api, long chatId, InputFile videoNote, [Optional] uint?duration, [Optional] uint?length, [Optional] InputFile?thumb, [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 SendVideoNoteArgs(chatId, videoNote) { Duration = duration, Length = length, Thumb = thumb, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(api.RPCF <Message>(MethodNames.SendVideoNote, args)); }
public static async Task <Message> SendVideoNoteAsync(this BotClient api, string chatId, InputFile videoNote, [Optional] uint?duration, [Optional] uint?length, [Optional] InputFile?thumb, [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 SendVideoNoteArgs(chatId, videoNote) { Duration = duration, Length = length, Thumb = thumb, DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(await api.RPCAF <Message>(MethodNames.SendVideoNote, args, cancellationToken).ConfigureAwait(false)); }
public static Message SendVideoNote(this BotClient api, string chatId, string videoNote, [Optional] uint?duration, [Optional] uint?length, [Optional] string?thumb, [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 SendVideoNoteArgs(chatId, videoNote) { Duration = duration, Length = length, Thumb = thumb, 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.SendVideoNote, args)); }