Browse Source

Add XML doc

pull/1161/head
Still Hsu 7 years ago
parent
commit
199bcd6b26
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
3 changed files with 26 additions and 10 deletions
  1. +6
    -1
      src/Discord.Net.Core/Entities/ISnowflakeEntity.cs
  2. +18
    -8
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
  3. +2
    -1
      src/Discord.Net.WebSocket/Entities/SocketEntity.cs

+ 6
- 1
src/Discord.Net.Core/Entities/ISnowflakeEntity.cs View File

@@ -5,7 +5,12 @@ namespace Discord
/// <summary> Represents a Discord snowflake entity. </summary>
public interface ISnowflakeEntity : IEntity<ulong>
{
/// <summary> Gets when the snowflake is created. </summary>
/// <summary>
/// Gets when the snowflake is created.
/// </summary>
/// <returns>
/// A <see cref="DateTimeOffset"/> representing when the entity was first created.
/// </returns>
DateTimeOffset CreatedAt { get; }
}
}

+ 18
- 8
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -56,11 +56,15 @@ namespace Discord.WebSocket
/// <remarks>
/// This property retrieves the number of members returned by Discord.
/// <note type="tip">
/// <para>
/// Due to how this property is returned by Discord instead of relying on the WebSocket cache, the
/// number here is the most accurate in terms of counting the number of users within this guild. Use
/// this instead of enumerating the count of the <see cref="Discord.WebSocket.SocketGuild.Users" />
/// collection, as you may see discrepancy between the count of
/// <see cref="Discord.WebSocket.SocketGuild.Users" />collection and this property.
/// number here is the most accurate in terms of counting the number of users within this guild.
/// </para>
/// <para>
/// Use this instead of enumerating the count of the
/// <see cref="Discord.WebSocket.SocketGuild.Users" /> collection, as you may see discrepancy
/// between that and this property.
/// </para>
/// </note>
/// </remarks>
public int MemberCount { get; internal set; }
@@ -220,10 +224,16 @@ namespace Discord.WebSocket
/// <remarks>
/// This property retrieves all users found within this guild.
/// <note type="warning">
/// This property may not always return all the members for large guilds (i.e. guilds containing 100+ users).
/// If you are simply looking to get the number of users present in this guild, consider <see cref="MemberCount"/> instead.
/// Otherwise, you may need to enable <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/> to fetch the full user list
/// upon startup, or use <see cref="DownloadUsersAsync"/> to manually download the users.
/// <para>
/// This property may not always return all the members for large guilds (i.e. guilds containing
/// 100+ users). If you are simply looking to get the number of users present in this guild,
/// consider using <see cref="MemberCount"/> instead.
/// </para>
/// <para>
/// Otherwise, you may need to enable <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/> to fetch
/// the full user list upon startup, or use <see cref="DownloadUsersAsync"/> to manually download
/// the users.
/// </para>
/// </note>
/// </remarks>
/// <returns>


+ 2
- 1
src/Discord.Net.WebSocket/Entities/SocketEntity.cs View File

@@ -1,4 +1,4 @@
using System;
using System;

namespace Discord.WebSocket
{
@@ -6,6 +6,7 @@ namespace Discord.WebSocket
where T : IEquatable<T>
{
internal DiscordSocketClient Discord { get; }
/// <inheritdoc />
public T Id { get; }

internal SocketEntity(DiscordSocketClient discord, T id)


Loading…
Cancel
Save