|
@@ -277,6 +277,18 @@ namespace Discord.API |
|
|
await SendAsync("GET", () => "auth/login", new BucketIds(), options: options).ConfigureAwait(false); |
|
|
await SendAsync("GET", () => "auth/login", new BucketIds(), options: options).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//Gateway |
|
|
|
|
|
public async Task<GetGatewayResponse> GetGatewayAsync(RequestOptions options = null) |
|
|
|
|
|
{ |
|
|
|
|
|
options = RequestOptions.CreateOrClone(options); |
|
|
|
|
|
return await SendAsync<GetGatewayResponse>("GET", () => "gateway", new BucketIds(), options: options).ConfigureAwait(false); |
|
|
|
|
|
} |
|
|
|
|
|
public async Task<GetBotGatewayResponse> GetBotGatewayAsync(RequestOptions options = null) |
|
|
|
|
|
{ |
|
|
|
|
|
options = RequestOptions.CreateOrClone(options); |
|
|
|
|
|
return await SendAsync<GetBotGatewayResponse>("GET", () => "gateway/bot", new BucketIds(), options: options).ConfigureAwait(false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//Channels |
|
|
//Channels |
|
|
public async Task<Channel> GetChannelAsync(ulong channelId, RequestOptions options = null) |
|
|
public async Task<Channel> GetChannelAsync(ulong channelId, RequestOptions options = null) |
|
|
{ |
|
|
{ |
|
@@ -459,6 +471,8 @@ namespace Discord.API |
|
|
endpoint = () => $"channels/{channelId}/messages?limit={limit}"; |
|
|
endpoint = () => $"channels/{channelId}/messages?limit={limit}"; |
|
|
return await SendAsync<IReadOnlyCollection<Message>>("GET", endpoint, ids, options: options).ConfigureAwait(false); |
|
|
return await SendAsync<IReadOnlyCollection<Message>>("GET", endpoint, ids, options: options).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Message> CreateMessageAsync(ulong channelId, CreateMessageParams args, RequestOptions options = null) |
|
|
public async Task<Message> CreateMessageAsync(ulong channelId, CreateMessageParams args, RequestOptions options = null) |
|
|
{ |
|
|
{ |
|
|
Preconditions.NotNull(args, nameof(args)); |
|
|
Preconditions.NotNull(args, nameof(args)); |
|
|