Browse Source

Refactor tools have failed me

tags/docs-0.9
Brandon Smith 9 years ago
parent
commit
82d909a7c7
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      src/Discord.Net/DiscordClient.API.cs
  2. +3
    -3
      src/Discord.Net/DiscordClient.Cache.cs

+ 2
- 2
src/Discord.Net/DiscordClient.API.cs View File

@@ -267,10 +267,10 @@ namespace Discord
}
/// <summary> Sends a private message to the provided channel. </summary>
public async Task<Message[]> SendPrivateMessage(User user, string text)
=> await SendMessage(await GetOrCreatePMChannel(user), text, new string[0]);
=> await SendMessage(await GetPMChannel(user), text, new string[0]);
/// <summary> Sends a private message to the provided channel. </summary>
public async Task<Message[]> SendPrivateMessage(string userId, string text)
=> await SendMessage(await GetOrCreatePMChannel(userId), text, new string[0]);
=> await SendMessage(await GetPMChannel(userId), text, new string[0]);
/*/// <summary> Sends a private message to the provided user, mentioning certain users. </summary>
/// <remarks> While not required, it is recommended to include a mention reference in the text (see User.Mention). </remarks>
public async Task<Message[]> SendPrivateMessage(User user, string text, string[] mentions)


+ 3
- 3
src/Discord.Net/DiscordClient.Cache.cs View File

@@ -385,10 +385,10 @@ namespace Discord
/// <summary> Returns the channel with the specified id, or null if none was found. </summary>
public Channel GetChannel(string id) => _channels[id];
/// <summary> Returns the private channel with the provided user, creating one if it does not currently exist. </summary>
public Task<Channel> GetOrCreatePMChannel(string userId)
=> GetOrCreatePMChannel(_users[userId]);
public Task<Channel> GetPMChannel(string userId)
=> GetPMChannel(_users[userId]);
/// <summary> Returns the private channel with the provided user, creating one if it does not currently exist. </summary>
public async Task<Channel> GetOrCreatePMChannel(User user)
public async Task<Channel> GetPMChannel(User user)
{
CheckReady();
if (user == null) throw new ArgumentNullException(nameof(user));


Loading…
Cancel
Save