From e85fca6b45729c8ff64c30c8c91c50e57891f98a Mon Sep 17 00:00:00 2001 From: sarcasmloading <29299928+sarcasmloading@users.noreply.github.com> Date: Wed, 11 Jul 2018 21:42:13 +1200 Subject: [PATCH] Added documentation for many audit log data types, fixed vowel indefinite articles --- .../DataTypes/ChannelCreateAuditLogData.cs | 2 +- .../DataTypes/ChannelDeleteAuditLogData.cs | 2 +- .../DataTypes/ChannelUpdateAuditLogData.cs | 14 ++++++++++++- .../DataTypes/EmoteCreateAuditLogData.cs | 2 +- .../DataTypes/EmoteDeleteAuditLogData.cs | 2 +- .../DataTypes/EmoteUpdateAuditLogData.cs | 2 +- .../Entities/AuditLogs/DataTypes/GuildInfo.cs | 2 +- .../DataTypes/InviteCreateAuditLogData.cs | 2 +- .../DataTypes/InviteDeleteAuditLogData.cs | 2 +- .../AuditLogs/DataTypes/InviteInfo.cs | 2 +- .../DataTypes/InviteUpdateAuditLogData.cs | 15 +++++++++++++ .../AuditLogs/DataTypes/KickAuditLogData.cs | 9 ++++++++ .../DataTypes/MemberRoleAuditLogData.cs | 15 +++++++++++++ .../AuditLogs/DataTypes/MemberRoleEditInfo.cs | 21 +++++++++++++++++++ 14 files changed, 82 insertions(+), 10 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs index ffd620e04..ce3a96041 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs @@ -50,7 +50,7 @@ namespace Discord.Rest /// Gets the snowflake ID of the created channel. /// /// - /// An representing the snowflake identifier for the created channel. + /// A representing the snowflake identifier for the created channel. /// public ulong ChannelId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs index c56bf6d32..f16a79475 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs @@ -41,7 +41,7 @@ namespace Discord.Rest /// Gets the snowflake ID of the deleted channel. /// /// - /// An representing the snowflake identifier for the deleted channel. + /// A representing the snowflake identifier for the deleted channel. /// public ulong ChannelId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs index 7cad9eff7..0ab39aba8 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs @@ -45,10 +45,22 @@ namespace Discord.Rest /// Gets the snowflake ID of the updated channel. /// /// - /// An representing the snowflake identifier for the updated channel. + /// A representing the snowflake identifier for the updated channel. /// public ulong ChannelId { get; } + /// + /// Gets the channel information before the changes. + /// + /// + /// An information object containing the original channel information before the changes were made. + /// public ChannelInfo Before { get; } + /// + /// Gets the channel information after the changes. + /// + /// + /// An information object containing the channel information after the changes were made. + /// public ChannelInfo After { get; } } } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs index a114548cc..99d7ff24a 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs @@ -28,7 +28,7 @@ namespace Discord.Rest /// Gets the snowflake ID of the created emoji. /// /// - /// An representing the snowflake identifier for the created emoji. + /// A representing the snowflake identifier for the created emoji. /// public ulong EmoteId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs index e522b0ee2..ec74e3aef 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs @@ -29,7 +29,7 @@ namespace Discord.Rest /// Gets the snowflake ID of the deleted emoji. /// /// - /// An representing the snowflake identifier for the deleted emoji. + /// A representing the snowflake identifier for the deleted emoji. /// public ulong EmoteId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs index e8cd76513..de6550039 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs @@ -31,7 +31,7 @@ namespace Discord.Rest /// Gets the snowflake ID of the updated emoji. /// /// - /// An representing the snowflake identifier of the updated emoji. + /// A representing the snowflake identifier of the updated emoji. /// public ulong EmoteId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs index 494aac133..df63251d8 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs @@ -38,7 +38,7 @@ namespace Discord.Rest /// Gets the ID of the AFK voice channel for this guild. /// /// - /// An representing the snowflake identifier of the AFK voice channel; null if + /// A representing the snowflake identifier of the AFK voice channel; null if /// none is set. /// public ulong? AfkChannelId { get; } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs index df95d13b6..2da5abc24 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs @@ -81,7 +81,7 @@ namespace Discord.Rest /// Gets the ID of the channel this invite is linked to. /// /// - /// An representing the channel snowflake identifier that the invite points to. + /// A representing the channel snowflake identifier that the invite points to. /// public ulong ChannelId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs index 472f227c0..f585ada34 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs @@ -81,7 +81,7 @@ namespace Discord.Rest /// Gets the ID of the channel this invite is linked to. /// /// - /// An representing the channel snowflake identifier that the invite points to. + /// A representing the channel snowflake identifier that the invite points to. /// public ulong ChannelId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs index 54026dbf3..35f8937c2 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs @@ -42,7 +42,7 @@ namespace Discord.Rest /// Gets the ID of the channel this invite is linked to. /// /// - /// An representing the channel snowflake identifier that the invite points to; + /// A representing the channel snowflake identifier that the invite points to; /// null if not specified. /// public ulong? ChannelId { get; } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs index b932cfbfc..b0ffaa03a 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs @@ -5,6 +5,9 @@ using EntryModel = Discord.API.AuditLogEntry; namespace Discord.Rest { + /// + /// Represents a piece of audit log data relating to an invite update. + /// public class InviteUpdateAuditLogData : IAuditLogData { private InviteUpdateAuditLogData(InviteInfo before, InviteInfo after) @@ -40,7 +43,19 @@ namespace Discord.Rest return new InviteUpdateAuditLogData(before, after); } + /// + /// Gets the invite information before the changes. + /// + /// + /// An information object containing the original invite information before the changes were made. + /// public InviteInfo Before { get; } + /// + /// Gets the invite information after the changes. + /// + /// + /// An information object containing the invite information after the changes were made. + /// public InviteInfo After { get; } } } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs index 41b5526b8..605ce604a 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs @@ -5,6 +5,9 @@ using EntryModel = Discord.API.AuditLogEntry; namespace Discord.Rest { + /// + /// Represents a piece of audit log data related to a kick. + /// public class KickAuditLogData : IAuditLogData { private KickAuditLogData(RestUser user) @@ -18,6 +21,12 @@ namespace Discord.Rest return new KickAuditLogData(RestUser.Create(discord, userInfo)); } + /// + /// Gets the user that was kicked. + /// + /// + /// A user object representing the kicked user. + /// public IUser Target { get; } } } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs index 0d9a2a708..c6f036232 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs @@ -6,6 +6,9 @@ using EntryModel = Discord.API.AuditLogEntry; namespace Discord.Rest { + /// + /// A piece of audit log data related to a change in a guild member's roles. + /// public class MemberRoleAuditLogData : IAuditLogData { private MemberRoleAuditLogData(IReadOnlyCollection roles, IUser target) @@ -29,7 +32,19 @@ namespace Discord.Rest return new MemberRoleAuditLogData(roleInfos.ToReadOnlyCollection(), user); } + /// + /// Gets a collection of role changes that were performed on the member. + /// + /// + /// A read-only collection of . + /// public IReadOnlyCollection Roles { get; } + /// + /// Gets the user that the roles changes were performed on. + /// + /// + /// A user object representing the user that the role changes were performed on. + /// public IUser Target { get; } } } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs index 4838b75c9..953d15bb1 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs @@ -1,5 +1,8 @@ namespace Discord.Rest { + /// + /// An information object representing a change in one of a member's roles. + /// public struct MemberRoleEditInfo { internal MemberRoleEditInfo(string name, ulong roleId, bool added) @@ -9,8 +12,26 @@ namespace Discord.Rest Added = added; } + /// + /// Gets the name of the role that was changed. + /// + /// + /// A string containing the name of the role that was changed. + /// public string Name { get; } + /// + /// Gets the ID of the role that was changed. + /// + /// + /// A representing the snowflake identifier of the role that was changed. + /// public ulong RoleId { get; } + /// + /// Determines whether the role was added to the user. + /// + /// + /// true if the role was added to the user; otherwise false. + /// public bool Added { get; } } }