public static async Task <Message> SendStickerAsync(this BotClient bot, SendStickerArgs 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.SendSticker, args, cancellationToken : cancellationToken).ConfigureAwait(false)); }
public static Message SendSticker(this BotClient bot, SendStickerArgs args) { if (bot == default) { throw new ArgumentNullException(nameof(bot)); } if (args == default) { throw new ArgumentNullException(nameof(args)); } return(bot.RPCF <Message>(MethodNames.SendSticker, args)); }
public static Message SendSticker(this BotClient api, long chatId, string sticker, [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 SendStickerArgs(chatId, sticker) { DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(api.RPCF <Message>(MethodNames.SendSticker, args)); }
public static async Task <Message> SendStickerAsync(this BotClient api, string chatId, string sticker, [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 SendStickerArgs(chatId, sticker) { DisableNotification = disableNotification, ProtectContent = protectContent, ReplyToMessageId = replyToMessageId, AllowSendingWithoutReply = allowSendingWithoutReply, ReplyMarkup = replyMarkup }; return(await api.RPCAF <Message>(MethodNames.SendSticker, args, cancellationToken).ConfigureAwait(false)); }