Browse Source

Added documentation for many audit log data types, fixed vowel indefinite articles

pull/1161/head
sarcasmloading 7 years ago
parent
commit
e85fca6b45
14 changed files with 82 additions and 10 deletions
  1. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs
  2. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs
  3. +13
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs
  4. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs
  5. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs
  6. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs
  7. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs
  8. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs
  9. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs
  10. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs
  11. +15
    -0
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs
  12. +9
    -0
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs
  13. +15
    -0
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs
  14. +21
    -0
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs

+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs View File

@@ -50,7 +50,7 @@ namespace Discord.Rest
/// Gets the snowflake ID of the created channel. /// Gets the snowflake ID of the created channel.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the snowflake identifier for the created channel.
/// A <see cref="ulong"/> representing the snowflake identifier for the created channel.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelDeleteAuditLogData.cs View File

@@ -41,7 +41,7 @@ namespace Discord.Rest
/// Gets the snowflake ID of the deleted channel. /// Gets the snowflake ID of the deleted channel.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the snowflake identifier for the deleted channel.
/// A <see cref="ulong"/> representing the snowflake identifier for the deleted channel.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }
/// <summary> /// <summary>


+ 13
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelUpdateAuditLogData.cs View File

@@ -45,10 +45,22 @@ namespace Discord.Rest
/// Gets the snowflake ID of the updated channel. /// Gets the snowflake ID of the updated channel.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the snowflake identifier for the updated channel.
/// A <see cref="ulong"/> representing the snowflake identifier for the updated channel.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }
/// <summary>
/// Gets the channel information before the changes.
/// </summary>
/// <returns>
/// An information object containing the original channel information before the changes were made.
/// </returns>
public ChannelInfo Before { get; } public ChannelInfo Before { get; }
/// <summary>
/// Gets the channel information after the changes.
/// </summary>
/// <returns>
/// An information object containing the channel information after the changes were made.
/// </returns>
public ChannelInfo After { get; } public ChannelInfo After { get; }
} }
} }

+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteCreateAuditLogData.cs View File

@@ -28,7 +28,7 @@ namespace Discord.Rest
/// Gets the snowflake ID of the created emoji. /// Gets the snowflake ID of the created emoji.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="System.UInt64"/> representing the snowflake identifier for the created emoji.
/// A <see cref="System.UInt64"/> representing the snowflake identifier for the created emoji.
/// </returns> /// </returns>
public ulong EmoteId { get; } public ulong EmoteId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteDeleteAuditLogData.cs View File

@@ -29,7 +29,7 @@ namespace Discord.Rest
/// Gets the snowflake ID of the deleted emoji. /// Gets the snowflake ID of the deleted emoji.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="System.UInt64"/> representing the snowflake identifier for the deleted emoji.
/// A <see cref="System.UInt64"/> representing the snowflake identifier for the deleted emoji.
/// </returns> /// </returns>
public ulong EmoteId { get; } public ulong EmoteId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/EmoteUpdateAuditLogData.cs View File

@@ -31,7 +31,7 @@ namespace Discord.Rest
/// Gets the snowflake ID of the updated emoji. /// Gets the snowflake ID of the updated emoji.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="System.UInt64"/> representing the snowflake identifier of the updated emoji.
/// A <see cref="ulong"/> representing the snowflake identifier of the updated emoji.
/// </returns> /// </returns>
public ulong EmoteId { get; } public ulong EmoteId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/GuildInfo.cs View File

@@ -38,7 +38,7 @@ namespace Discord.Rest
/// Gets the ID of the AFK voice channel for this guild. /// Gets the ID of the AFK voice channel for this guild.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the snowflake identifier of the AFK voice channel; <c>null</c> if
/// A <see cref="ulong"/> representing the snowflake identifier of the AFK voice channel; <c>null</c> if
/// none is set. /// none is set.
/// </returns> /// </returns>
public ulong? AfkChannelId { get; } public ulong? AfkChannelId { get; }


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteCreateAuditLogData.cs View File

@@ -81,7 +81,7 @@ namespace Discord.Rest
/// Gets the ID of the channel this invite is linked to. /// Gets the ID of the channel this invite is linked to.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the channel snowflake identifier that the invite points to.
/// A <see cref="ulong"/> representing the channel snowflake identifier that the invite points to.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteDeleteAuditLogData.cs View File

@@ -81,7 +81,7 @@ namespace Discord.Rest
/// Gets the ID of the channel this invite is linked to. /// Gets the ID of the channel this invite is linked to.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the channel snowflake identifier that the invite points to.
/// A <see cref="ulong"/> representing the channel snowflake identifier that the invite points to.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteInfo.cs View File

@@ -42,7 +42,7 @@ namespace Discord.Rest
/// Gets the ID of the channel this invite is linked to. /// Gets the ID of the channel this invite is linked to.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="ulong"/> representing the channel snowflake identifier that the invite points to;
/// A <see cref="ulong"/> representing the channel snowflake identifier that the invite points to;
/// <c>null</c> if not specified. /// <c>null</c> if not specified.
/// </returns> /// </returns>
public ulong? ChannelId { get; } public ulong? ChannelId { get; }


+ 15
- 0
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/InviteUpdateAuditLogData.cs View File

@@ -5,6 +5,9 @@ using EntryModel = Discord.API.AuditLogEntry;


namespace Discord.Rest namespace Discord.Rest
{ {
/// <summary>
/// Represents a piece of audit log data relating to an invite update.
/// </summary>
public class InviteUpdateAuditLogData : IAuditLogData public class InviteUpdateAuditLogData : IAuditLogData
{ {
private InviteUpdateAuditLogData(InviteInfo before, InviteInfo after) private InviteUpdateAuditLogData(InviteInfo before, InviteInfo after)
@@ -40,7 +43,19 @@ namespace Discord.Rest
return new InviteUpdateAuditLogData(before, after); return new InviteUpdateAuditLogData(before, after);
} }


/// <summary>
/// Gets the invite information before the changes.
/// </summary>
/// <returns>
/// An information object containing the original invite information before the changes were made.
/// </returns>
public InviteInfo Before { get; } public InviteInfo Before { get; }
/// <summary>
/// Gets the invite information after the changes.
/// </summary>
/// <returns>
/// An information object containing the invite information after the changes were made.
/// </returns>
public InviteInfo After { get; } public InviteInfo After { get; }
} }
} }

+ 9
- 0
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/KickAuditLogData.cs View File

@@ -5,6 +5,9 @@ using EntryModel = Discord.API.AuditLogEntry;


namespace Discord.Rest namespace Discord.Rest
{ {
/// <summary>
/// Represents a piece of audit log data related to a kick.
/// </summary>
public class KickAuditLogData : IAuditLogData public class KickAuditLogData : IAuditLogData
{ {
private KickAuditLogData(RestUser user) private KickAuditLogData(RestUser user)
@@ -18,6 +21,12 @@ namespace Discord.Rest
return new KickAuditLogData(RestUser.Create(discord, userInfo)); return new KickAuditLogData(RestUser.Create(discord, userInfo));
} }


/// <summary>
/// Gets the user that was kicked.
/// </summary>
/// <returns>
/// A user object representing the kicked user.
/// </returns>
public IUser Target { get; } public IUser Target { get; }
} }
} }

+ 15
- 0
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleAuditLogData.cs View File

@@ -6,6 +6,9 @@ using EntryModel = Discord.API.AuditLogEntry;


namespace Discord.Rest namespace Discord.Rest
{ {
/// <summary>
/// A piece of audit log data related to a change in a guild member's roles.
/// </summary>
public class MemberRoleAuditLogData : IAuditLogData public class MemberRoleAuditLogData : IAuditLogData
{ {
private MemberRoleAuditLogData(IReadOnlyCollection<MemberRoleEditInfo> roles, IUser target) private MemberRoleAuditLogData(IReadOnlyCollection<MemberRoleEditInfo> roles, IUser target)
@@ -29,7 +32,19 @@ namespace Discord.Rest
return new MemberRoleAuditLogData(roleInfos.ToReadOnlyCollection(), user); return new MemberRoleAuditLogData(roleInfos.ToReadOnlyCollection(), user);
} }


/// <summary>
/// Gets a collection of role changes that were performed on the member.
/// </summary>
/// <returns>
/// A read-only collection of <see cref="MemberRoleEditInfo"/>.
/// </returns>
public IReadOnlyCollection<MemberRoleEditInfo> Roles { get; } public IReadOnlyCollection<MemberRoleEditInfo> Roles { get; }
/// <summary>
/// Gets the user that the roles changes were performed on.
/// </summary>
/// <returns>
/// A user object representing the user that the role changes were performed on.
/// </returns>
public IUser Target { get; } public IUser Target { get; }
} }
} }

+ 21
- 0
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs View File

@@ -1,5 +1,8 @@
namespace Discord.Rest namespace Discord.Rest
{ {
/// <summary>
/// An information object representing a change in one of a member's roles.
/// </summary>
public struct MemberRoleEditInfo public struct MemberRoleEditInfo
{ {
internal MemberRoleEditInfo(string name, ulong roleId, bool added) internal MemberRoleEditInfo(string name, ulong roleId, bool added)
@@ -9,8 +12,26 @@ namespace Discord.Rest
Added = added; Added = added;
} }


/// <summary>
/// Gets the name of the role that was changed.
/// </summary>
/// <returns>
/// A string containing the name of the role that was changed.
/// </returns>
public string Name { get; } public string Name { get; }
/// <summary>
/// Gets the ID of the role that was changed.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the role that was changed.
/// </returns>
public ulong RoleId { get; } public ulong RoleId { get; }
/// <summary>
/// Determines whether the role was added to the user.
/// </summary>
/// <returns>
/// <c>true</c> if the role was added to the user; otherwise <c>false</c>.
/// </returns>
public bool Added { get; } public bool Added { get; }
} }
} }

Loading…
Cancel
Save