Browse Source

Apply suggestions from code review

pull/2590/head
Casmir GitHub 2 years ago
parent
commit
573728299a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/Discord.Net.Rest/DiscordRestApiClient.cs

+ 5
- 5
src/Discord.Net.Rest/DiscordRestApiClient.cs View File

@@ -1139,14 +1139,14 @@ namespace Discord.API
await SendAsync("POST", () => $"channels/{channelId}/messages/{messageId}/crosspost", ids, options: options).ConfigureAwait(false); await SendAsync("POST", () => $"channels/{channelId}/messages/{messageId}/crosspost", ids, options: options).ConfigureAwait(false);
} }


public async Task<FollowedChannel> FollowChannelAsync(ulong newsChanneId, ulong followingChannelId, RequestOptions options = null)
public async Task<FollowedChannel> FollowChannelAsync(ulong newsChannelId, ulong followingChannelId, RequestOptions options = null)
{ {
Preconditions.NotEqual(newsChanneId, 0, nameof(newsChanneId));
Preconditions.NotEqual(newsChanneId, 0, nameof(followingChannelId));
Preconditions.NotEqual(newsChannelId, 0, nameof(newsChannelId));
Preconditions.NotEqual(followingChannelId, 0, nameof(followingChannelId));
options = RequestOptions.CreateOrClone(options); options = RequestOptions.CreateOrClone(options);


var ids = new BucketIds(channelId: newsChanneId);
return await SendJsonAsync<FollowedChannel>("POST", () => $"channels/{newsChanneId}/followers", new { webhook_channel_id = followingChannelId}, ids, options: options).ConfigureAwait(false);
var ids = new BucketIds(channelId: newsChannelId);
return await SendJsonAsync<FollowedChannel>("POST", () => $"channels/{newsChannelId}/followers", new { webhook_channel_id = followingChannelId}, ids, options: options).ConfigureAwait(false);
} }
#endregion #endregion




Loading…
Cancel
Save