From faef9a9a53c965e3d24cefb5efcd1ebf749665dc Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Thu, 5 Jul 2018 14:26:25 +0800 Subject: [PATCH] Fix minor docs --- src/Discord.Net.WebSocket/BaseSocketClient.cs | 6 +++--- .../Entities/Channels/SocketChannel.cs | 8 ++------ .../Entities/Channels/SocketGroupChannel.cs | 8 ++------ src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs | 6 +++--- .../Entities/Messages/SocketReaction.cs | 3 ++- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/Discord.Net.WebSocket/BaseSocketClient.cs b/src/Discord.Net.WebSocket/BaseSocketClient.cs index 29c08a4ef..f176b6260 100644 --- a/src/Discord.Net.WebSocket/BaseSocketClient.cs +++ b/src/Discord.Net.WebSocket/BaseSocketClient.cs @@ -63,12 +63,12 @@ namespace Discord.WebSocket /// public abstract Task GetApplicationInfoAsync(RequestOptions options = null); /// - /// Gets a user. + /// Gets a generic user. /// /// The user snowflake ID. /// /// This method gets the user present in the WebSocket cache with the given condition. - /// + /// /// Sometimes a user may return null due to Discord not sending offline users in large /// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling /// . @@ -90,7 +90,7 @@ namespace Discord.WebSocket /// The discriminator value of the user. /// /// This method gets the user present in the WebSocket cache with the given condition. - /// + /// /// Sometimes a user may return null due to Discord not sending offline users in large /// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling /// . diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketChannel.cs index c4787c104..13c0c9b4f 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketChannel.cs @@ -44,15 +44,11 @@ namespace Discord.WebSocket //User /// - /// Gets the user from the WebSocket cache. + /// Gets a generic user from this channel. /// - /// - /// This method does NOT attempt to fetch the user if they don't exist in the cache. To guarantee a return - /// from an existing user that doesn't exist in cache, use . - /// /// The snowflake identifier of the user. /// - /// A user object associated with the snowflake identifier. + /// A generic WebSocket-based user associated with the snowflake identifier. /// public SocketUser GetUser(ulong id) => GetUserInternal(id); internal abstract SocketUser GetUserInternal(ulong id); diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs index a97e402df..5b4e7d8be 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs @@ -138,15 +138,11 @@ namespace Discord.WebSocket //Users /// - /// Gets the group user from the WebSocket cache. + /// Gets a user from this group. /// - /// - /// This method does NOT attempt to fetch the user if they don't exist in the cache. To guarantee a return - /// from an existing user that doesn't exist in cache, use . - /// /// The snowflake identifier of the user. /// - /// The user in the group. + /// A WebSocket-based group user associated with the snowflake identifier. /// public new SocketGroupUser GetUser(ulong id) { diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index 77e356739..c1fd15255 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -582,11 +582,11 @@ namespace Discord.WebSocket //Users /// - /// Gets the user with the provided ID. + /// Gets a user from this guild. /// - /// The ID of the user. + /// The snowflake identifier of the user (e.g. `168693960628371456`). /// - /// The user associated with the ID. + /// A WebSocket-based guild user associated with the snowflake identifier. /// public SocketGuildUser GetUser(ulong id) { diff --git a/src/Discord.Net.WebSocket/Entities/Messages/SocketReaction.cs b/src/Discord.Net.WebSocket/Entities/Messages/SocketReaction.cs index 56b4c19e1..9c3a5f32b 100644 --- a/src/Discord.Net.WebSocket/Entities/Messages/SocketReaction.cs +++ b/src/Discord.Net.WebSocket/Entities/Messages/SocketReaction.cs @@ -18,8 +18,9 @@ namespace Discord.WebSocket /// Gets the user who added the reaction if possible. /// /// - /// A user object where possible. This value is not always returned. + /// A user object where possible; a value is not always returned. /// + /// public Optional User { get; } /// /// Gets the ID of the message that has been reacted to.