Bug fixes

This commit is contained in:
Brandon Smith
2015-08-13 13:09:43 -03:00
parent 71a07f0109
commit 206bafce7b

View File

@@ -351,7 +351,8 @@ namespace Discord
{
var data = e.Event.ToObject<WebSocketEvents.MessageDelete>();
var msg = GetMessage(data.MessageId);
_messages.Remove(msg.Id);
if (msg != null)
_messages.Remove(msg.Id);
}
break;
case "MESSAGE_ACK":
@@ -464,9 +465,9 @@ namespace Discord
var response = await DiscordAPI.CreateChannel(serverId, name, region, _httpOptions);
return _channels.Update(response.Id, response);
}
public Task<Channel> CreatePMChannel(User user, string name, string region)
=> CreateChannel(user.Id, name, region);
public async Task<Channel> CreatePMChannel(string recipientId, string name, string region)
public Task<Channel> CreatePMChannel(User user)
=> CreatePMChannel(user.Id);
public async Task<Channel> CreatePMChannel(string recipientId)
{
CheckReady();
var response = await DiscordAPI.CreatePMChannel(UserId, recipientId, _httpOptions);