Add support for audit log reasons (#708)
* Add support for audit log reasons * Made changes per discussion
This commit is contained in:
committed by
RogueException
parent
9085e44dda
commit
1ce1c019b3
@@ -66,7 +66,7 @@ namespace Discord.Net
|
||||
_cancelToken = CancellationTokenSource.CreateLinkedTokenSource(_parentToken, _cancelTokenSource.Token).Token;
|
||||
}
|
||||
|
||||
public async Task<RestResponse> SendAsync(string method, string endpoint, CancellationToken cancelToken, bool headerOnly)
|
||||
public async Task<RestResponse> SendAsync(string method, string endpoint, CancellationToken cancelToken, bool headerOnly, string reason = null)
|
||||
{
|
||||
if (method != "GET")
|
||||
throw new InvalidOperationException("This RestClient only supports GET requests.");
|
||||
@@ -75,11 +75,11 @@ namespace Discord.Net
|
||||
var bytes = await _blobCache.DownloadUrl(uri, _headers);
|
||||
return new RestResponse(HttpStatusCode.OK, _headers, new MemoryStream(bytes));
|
||||
}
|
||||
public Task<RestResponse> SendAsync(string method, string endpoint, string json, CancellationToken cancelToken, bool headerOnly)
|
||||
public Task<RestResponse> SendAsync(string method, string endpoint, string json, CancellationToken cancelToken, bool headerOnly, string reason = null)
|
||||
{
|
||||
throw new InvalidOperationException("This RestClient does not support payloads.");
|
||||
}
|
||||
public Task<RestResponse> SendAsync(string method, string endpoint, IReadOnlyDictionary<string, object> multipartParams, CancellationToken cancelToken, bool headerOnly)
|
||||
public Task<RestResponse> SendAsync(string method, string endpoint, IReadOnlyDictionary<string, object> multipartParams, CancellationToken cancelToken, bool headerOnly, string reason = null)
|
||||
{
|
||||
throw new InvalidOperationException("This RestClient does not support multipart requests.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user