Browse Source

Add additional clarification for some methods

pull/1304/head
Still Hsu 6 years ago
parent
commit
79c3391921
2 changed files with 12 additions and 7 deletions
  1. +10
    -6
      src/Discord.Net.WebSocket/BaseSocketClient.cs
  2. +2
    -1
      src/Discord.Net.WebSocket/DiscordSocketConfig.cs

+ 10
- 6
src/Discord.Net.WebSocket/BaseSocketClient.cs View File

@@ -98,12 +98,14 @@ namespace Discord.WebSocket
/// This method gets the user present in the WebSocket cache with the given condition. /// This method gets the user present in the WebSocket cache with the given condition.
/// <note type="warning"> /// <note type="warning">
/// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large /// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large
/// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
/// <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// guilds (i.e. guild with 100+ members) actively. To download users on startup and to see
/// more information about this subject, see <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// </note> /// </note>
/// <note> /// <note>
/// This method does not attempt to fetch users that the logged-in user does not have access to (i.e. /// This method does not attempt to fetch users that the logged-in user does not have access to (i.e.
/// users who don't share mutual guild(s) with the current user).
/// users who don't share mutual guild(s) with the current user). If you wish to get a user that
/// you do not have access to, consider using the REST implementation of
/// <see cref="DiscordSocketRestClient.GetUserAsync"/>.
/// </note> /// </note>
/// </remarks> /// </remarks>
/// <returns> /// <returns>
@@ -120,12 +122,14 @@ namespace Discord.WebSocket
/// This method gets the user present in the WebSocket cache with the given condition. /// This method gets the user present in the WebSocket cache with the given condition.
/// <note type="warning"> /// <note type="warning">
/// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large /// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large
/// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
/// <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// guilds (i.e. guild with 100+ members) actively. To download users on startup and to see
/// more information about this subject, see <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// </note> /// </note>
/// <note> /// <note>
/// This method does not attempt to fetch users that the logged-in user does not have access to (i.e. /// This method does not attempt to fetch users that the logged-in user does not have access to (i.e.
/// users who don't share mutual guild(s) with the current user).
/// users who don't share mutual guild(s) with the current user). If you wish to get a user that
/// you do not have access to, consider using the REST implementation of
/// <see cref="DiscordSocketRestClient.GetUserAsync"/>.
/// </note> /// </note>
/// </remarks> /// </remarks>
/// <returns> /// <returns>


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

@@ -94,7 +94,8 @@ namespace Discord.WebSocket
/// Please note that it can be difficult to fill the cache completely on large guilds depending on the /// Please note that it can be difficult to fill the cache completely on large guilds depending on the
/// traffic. If you are using the command system, the default user TypeReader may fail to find the user /// traffic. If you are using the command system, the default user TypeReader may fail to find the user
/// due to this issue. This may be resolved at v3 of the library. Until then, you may want to consider /// due to this issue. This may be resolved at v3 of the library. Until then, you may want to consider
/// overriding the TypeReader and use <see cref="DiscordRestClient.GetGuildUserAsync"/> as a backup.
/// overriding the TypeReader and use <see cref="DiscordSocketRestClient.GetUserAsync"/>
/// or <see cref="DiscordSocketRestClient.GetGuildUserAsync"/> as a backup.
/// </note> /// </note>
/// </remarks> /// </remarks>
public bool AlwaysDownloadUsers { get; set; } = false; public bool AlwaysDownloadUsers { get; set; } = false;


Loading…
Cancel
Save