Refactor tools have failed me
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user