public static bool AddStickerToSet(this BotClient bot, AddStickerToSetArgs args) { if (bot == default) { throw new ArgumentNullException(nameof(bot)); } if (args == default) { throw new ArgumentNullException(nameof(args)); } return(bot.RPCF <bool>(MethodNames.AddStickerToSet, args)); }
public static async Task <bool> AddStickerToSetAsync(this BotClient bot, AddStickerToSetArgs args, [Optional] CancellationToken cancellationToken) { if (bot == default) { throw new ArgumentNullException(nameof(bot)); } if (args == default) { throw new ArgumentNullException(nameof(args)); } return(await bot.RPCAF <bool>(MethodNames.AddStickerToSet, args, cancellationToken : cancellationToken).ConfigureAwait(false)); }
public static bool AddStickerToSet(this BotClient api, int userId, string name, string emojis, [Optional] string?pngSticker, [Optional] InputFile?tgsSticker, [Optional] InputFile?webmSticker, [Optional] MaskPosition?maskPosition) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new AddStickerToSetArgs(userId, name, emojis) { PngSticker = pngSticker, TgsSticker = tgsSticker, WebmSticker = webmSticker, MaskPosition = maskPosition }; return(api.RPCF <bool>(MethodNames.AddStickerToSet, args)); }
public static async Task <bool> AddStickerToSetAsync(this BotClient api, int userId, string name, string emojis, [Optional] string?pngSticker, [Optional] InputFile?tgsSticker, [Optional] InputFile?webmSticker, [Optional] MaskPosition?maskPosition, [Optional] CancellationToken cancellationToken) { if (api == null) { throw new ArgumentNullException(nameof(api)); } var args = new AddStickerToSetArgs(userId, name, emojis) { PngSticker = pngSticker, TgsSticker = tgsSticker, WebmSticker = webmSticker, MaskPosition = maskPosition }; return(await api.RPCAF <bool>(MethodNames.AddStickerToSet, args, cancellationToken).ConfigureAwait(false)); }