Minor Cleanup
This commit is contained in:
@@ -926,8 +926,9 @@ namespace Discord
|
|||||||
//Logger.Verbose($"Presence Updated: {server.Name}/{user.Name}");
|
//Logger.Verbose($"Presence Updated: {server.Name}/{user.Name}");
|
||||||
OnUserPresenceUpdated(user);
|
OnUserPresenceUpdated(user);
|
||||||
}
|
}
|
||||||
else
|
/*else
|
||||||
Logger.Warning("PRESENCE_UPDATE referenced an unknown user.");
|
Logger.Warning("PRESENCE_UPDATE referenced an unknown user.");*/
|
||||||
|
//This happens when users leave a server
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "TYPING_START":
|
case "TYPING_START":
|
||||||
|
|||||||
@@ -409,16 +409,19 @@ namespace Discord
|
|||||||
{
|
{
|
||||||
foreach (var channel in AllChannels)
|
foreach (var channel in AllChannels)
|
||||||
channel.RemoveUser(id);
|
channel.RemoveUser(id);
|
||||||
|
return member.User;
|
||||||
}
|
}
|
||||||
return member.User;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Gets the user with the provided id and is a member of this server, or null if not found. </summary>
|
/// <summary> Gets the user with the provided id and is a member of this server, or null if not found. </summary>
|
||||||
public User GetUser(ulong id)
|
public User GetUser(ulong id)
|
||||||
{
|
{
|
||||||
Member result;
|
Member result;
|
||||||
_users.TryGetValue(id, out result);
|
if (_users.TryGetValue(id, out result))
|
||||||
return result.User;
|
return result.User;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
/// <summary> Gets the user with the provided username and discriminator, that is a member of this server, or null if not found. </summary>
|
/// <summary> Gets the user with the provided username and discriminator, that is a member of this server, or null if not found. </summary>
|
||||||
public User GetUser(string name, ushort discriminator)
|
public User GetUser(string name, ushort discriminator)
|
||||||
|
|||||||
Reference in New Issue
Block a user