diff --git a/src/Discord.Net.Core/Utils/MentionUtils.cs b/src/Discord.Net.Core/Utils/MentionUtils.cs index 6ffb7eee6..059df6b5a 100644 --- a/src/Discord.Net.Core/Utils/MentionUtils.cs +++ b/src/Discord.Net.Core/Utils/MentionUtils.cs @@ -40,6 +40,7 @@ namespace Discord /// /// Parses a provided user mention string. /// + /// The user mention. /// Invalid mention format. public static ulong ParseUser(string text) { @@ -50,6 +51,8 @@ namespace Discord /// /// Tries to parse a provided user mention string. /// + /// The user mention. + /// The UserId of the user. public static bool TryParseUser(string text, out ulong userId) { if (text.Length >= 3 && text[0] == '<' && text[1] == '@' && text[text.Length - 1] == '>') diff --git a/src/Discord.Net.Rest/API/Common/InviteVanity.cs b/src/Discord.Net.Rest/API/Common/InviteVanity.cs index a36ddee46..412795aa6 100644 --- a/src/Discord.Net.Rest/API/Common/InviteVanity.cs +++ b/src/Discord.Net.Rest/API/Common/InviteVanity.cs @@ -2,10 +2,20 @@ using Newtonsoft.Json; namespace Discord.API { + /// + /// Represents a vanity invite. + /// public class InviteVanity { + /// + /// The unique code for the invite link. + /// [JsonProperty("code")] public string Code { get; set; } + + /// + /// The total amount of vanity invite uses. + /// [JsonProperty("uses")] public int Uses { get; set; } } diff --git a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs index 873e803f2..fb25ddbd7 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs @@ -44,7 +44,7 @@ namespace Discord.WebSocket /// Sends a file to this message channel with an optional caption. /// /// - /// This method follows the same behavior as described in . + /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The file path of the file. @@ -68,7 +68,7 @@ namespace Discord.WebSocket /// Sends a file to this message channel with an optional caption. /// /// - /// This method follows the same behavior as described in . + /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The of the file to be sent. diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs index e559bdd4d..c7adc994e 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs @@ -31,7 +31,15 @@ namespace Discord.WebSocket /// public IReadOnlyCollection CachedMessages => _messages?.Messages ?? ImmutableArray.Create(); + + /// + /// Returns a collection representing all of the users in the group. + /// public new IReadOnlyCollection Users => _users.ToReadOnlyCollection(); + + /// + /// Returns a collection representing all users in the group, not including the client. + /// public IReadOnlyCollection Recipients => _users.Select(x => x.Value).Where(x => x.Id != Discord.CurrentUser.Id).ToReadOnlyCollection(() => _users.Count - 1); diff --git a/src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs b/src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs index 845b48b8b..acc9c4978 100644 --- a/src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs +++ b/src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs @@ -6,6 +6,9 @@ using Model = Discord.API.Gateway.InviteCreateEvent; namespace Discord.WebSocket { + /// + /// Represents a WebSocket-based invite to a guild. + /// [DebuggerDisplay(@"{DebuggerDisplay,nq}")] public class SocketInvite : SocketEntity, IInviteMetadata { diff --git a/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs b/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs index e6aac2c04..732b7818b 100644 --- a/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs +++ b/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs @@ -50,6 +50,10 @@ namespace Discord.WebSocket public bool IsEveryone => Id == Guild.Id; /// public string Mention => IsEveryone ? "@everyone" : MentionUtils.MentionRole(Id); + + /// + /// Returns an IEnumerable containing all that have this role. + /// public IEnumerable Members => Guild.Users.Where(x => x.Roles.Any(r => r.Id == Id)); diff --git a/src/Discord.Net.WebSocket/Entities/Users/SocketGroupUser.cs b/src/Discord.Net.WebSocket/Entities/Users/SocketGroupUser.cs index 676c0a86c..8545e492b 100644 --- a/src/Discord.Net.WebSocket/Entities/Users/SocketGroupUser.cs +++ b/src/Discord.Net.WebSocket/Entities/Users/SocketGroupUser.cs @@ -3,6 +3,9 @@ using Model = Discord.API.User; namespace Discord.WebSocket { + /// + /// Represents a WebSocket-based group user. + /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class SocketGroupUser : SocketUser, IGroupUser {