From 0b15bbc54d15c036f770bab818712956c527b4ee Mon Sep 17 00:00:00 2001
From: Still Hsu <341464@gmail.com>
Date: Sun, 6 May 2018 15:20:34 +0800
Subject: [PATCH] Add XML docs
---
src/Discord.Net.Core/IDiscordClient.cs | 31 +++++++++++++++-
src/Discord.Net.WebSocket/BaseSocketClient.cs | 37 +++++++++++--------
2 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/src/Discord.Net.Core/IDiscordClient.cs b/src/Discord.Net.Core/IDiscordClient.cs
index 92aee2b08..f5bbd0a28 100644
--- a/src/Discord.Net.Core/IDiscordClient.cs
+++ b/src/Discord.Net.Core/IDiscordClient.cs
@@ -10,16 +10,33 @@ namespace Discord
///
public interface IDiscordClient : IDisposable
{
+ ///
+ /// Gets the current state of connection.
+ ///
ConnectionState ConnectionState { get; }
+ ///
+ /// Gets the currently logged-in user.
+ ///
ISelfUser CurrentUser { get; }
+ ///
+ /// Gets the token type of the logged-in user.
+ ///
TokenType TokenType { get; }
Task StartAsync();
Task StopAsync();
///
- /// Gets the application information associated with this account.
+ /// Gets a Discord application information for the logged-in user.
///
+ ///
+ /// This method reflects your application information you submitted when creating a Discord application via
+ /// the Developer Portal.
+ ///
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing the application information.
+ ///
Task GetApplicationInfoAsync(RequestOptions options = null);
///
@@ -36,11 +53,21 @@ namespace Discord
///
Task> GetPrivateChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
- /// Gets a list of direct message channels.
+ /// Returns a collection of direct message channels.
///
+ ///
+ /// This method returns a collection of currently opened direct message channels.
+ ///
+ /// This method will not return previously opened DM channels outside of the current session! If you
+ /// have just started the client, this may return an empty collection.
+ ///
+ ///
///
/// The that determines whether the object should be fetched from cache.
///
+ ///
+ /// An awaitable containing a collection of DM channels.
+ ///
Task> GetDMChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a list of group channels.
diff --git a/src/Discord.Net.WebSocket/BaseSocketClient.cs b/src/Discord.Net.WebSocket/BaseSocketClient.cs
index 7dec313cf..b3702a811 100644
--- a/src/Discord.Net.WebSocket/BaseSocketClient.cs
+++ b/src/Discord.Net.WebSocket/BaseSocketClient.cs
@@ -60,15 +60,19 @@ namespace Discord.WebSocket
///
public abstract Task GetApplicationInfoAsync(RequestOptions options = null);
///
- /// Gets a user who shares a mutual guild with logged-in user with the provided snowflake ID.
+ /// Gets a user.
///
/// The user snowflake ID.
///
/// This method gets the user present in the WebSocket cache with the given condition.
- ///
- /// Sometimes a user may return because Discord does not send offline users in
- /// large guilds (i.e. guild with 100+ members) actively. To download more users on startup, please
- /// enable .
+ ///
+ /// Sometimes a user may return due to Discord not sending offline users in large
+ /// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
+ /// .
+ ///
+ ///
+ /// 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).
///
///
///
@@ -77,17 +81,20 @@ namespace Discord.WebSocket
public abstract SocketUser GetUser(ulong id);
///
- /// Gets a user who shares a mutual guild with the logged-in user with the provided username and
- /// discriminator value combo.
+ /// Gets a user.
///
/// The name of the user.
/// 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 because Discord does not send offline users in
- /// large guilds (i.e. guild with 100+ members) actively. To download more users on startup, please
- /// enable .
+ ///
+ /// Sometimes a user may return due to Discord not sending offline users in large
+ /// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
+ /// .
+ ///
+ ///
+ /// 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).
///
///
///
@@ -95,7 +102,7 @@ namespace Discord.WebSocket
///
public abstract SocketUser GetUser(string username, string discriminator);
///
- /// Gets a channel that the logged-in user is accessible to with the provided ID.
+ /// Gets a channel.
///
/// The channel snowflake ID.
///
@@ -104,7 +111,7 @@ namespace Discord.WebSocket
///
public abstract SocketChannel GetChannel(ulong id);
///
- /// Gets a guild that the logged-in user is accessible to with the provided ID.
+ /// Gets a guild.
///
/// The guild snowflake ID.
///
@@ -112,7 +119,7 @@ namespace Discord.WebSocket
///
public abstract SocketGuild GetGuild(ulong id);
///
- /// Gets a voice region with the provided ID.
+ /// Gets a voice region.
///
/// The unique identifier of the voice region.
///
@@ -149,7 +156,7 @@ namespace Discord.WebSocket
///
/// Discord will only accept setting of name and the type of activity.
///
- ///
+ ///
/// Rich Presence cannot be set via this method or client. Rich Presence is strictly limited to RPC
/// clients only.
///