/// <summary> /// Executes this webhook with a file attachment. /// <para>Note: Returns null unless <paramref name="waitAndReturnMessage"/> is set to true.</para> /// </summary> /// <param name="token">The webhook's token.</param> /// <param name="waitAndReturnMessage">Whether to wait for the message to be created /// and have it returned from this method.</param> /// <exception cref="ArgumentException">Thrown if the token is empty or only contains whitespace characters.</exception> /// <exception cref="ArgumentNullException">Thrown if the token is null /// or the file name is null, empty, or only contains whitespace characters.</exception> /// <exception cref="DiscordHttpApiException"></exception> public Task <DiscordMessage> Execute(string token, ArraySegment <byte> fileData, string fileName, ExecuteWebhookOptions options = null, bool waitAndReturnMessage = false) { return(http.ExecuteWebhook(Id, token, fileData, fileName, options, waitAndReturnMessage)); }
/// <summary> /// Executes this webhook. /// <para>Note: Returns null unless <paramref name="waitAndReturnMessage"/> is set to true.</para> /// </summary> /// <param name="token">The webhook's token.</param> /// <param name="waitAndReturnMessage">Whether to wait for the message to be created /// and have it returned from this method.</param> /// <exception cref="ArgumentException">Thrown if the token is empty or only contains whitespace characters.</exception> /// <exception cref="ArgumentNullException">Thrown if the token or <paramref name="options"/> is null.</exception> /// <exception cref="DiscordHttpApiException"></exception> public Task <DiscordMessage> Execute(string token, ExecuteWebhookOptions options, bool waitAndReturnMessage = false) { return(http.ExecuteWebhook(Id, token, options, waitAndReturnMessage)); }