From 02570a4dd7db6acbb53ff2f9105357ed1c2e0a00 Mon Sep 17 00:00:00 2001
From: Still Hsu <341464@gmail.com>
Date: Thu, 3 May 2018 22:06:18 +0800
Subject: [PATCH] Add XMLDocs
---
src/Discord.Net.Commands/CommandService.cs | 8 ++++++--
src/Discord.Net.Commands/Extensions/MessageExtensions.cs | 4 ++--
src/Discord.Net.Commands/Results/TypeReaderResult.cs | 2 ++
.../Entities/Messages/MessageProperties.cs | 2 +-
src/Discord.Net.Rest/API/Common/InviteMetadata.cs | 2 +-
src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs | 1 +
6 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs
index a8ef5b62a..39cae845e 100644
--- a/src/Discord.Net.Commands/CommandService.cs
+++ b/src/Discord.Net.Commands/CommandService.cs
@@ -60,10 +60,12 @@ namespace Discord.Commands
public CommandService() : this(new CommandServiceConfig()) { }
///
- /// Initializes a new class with the provided configuration.
+ /// Initializes a new class with the provided configuration.
///
/// The configuration class.
- /// The is set to .
+ ///
+ /// The cannot be set to .
+ ///
public CommandService(CommandServiceConfig config)
{
_caseSensitive = config.CaseSensitiveCommands;
@@ -132,6 +134,8 @@ namespace Discord.Commands
///
/// A built module.
///
+ /// This module has already been added.
+ /// The fails to be built; an invalid type may have been provided.
public Task AddModuleAsync(IServiceProvider services) => AddModuleAsync(typeof(T), services);
///
diff --git a/src/Discord.Net.Commands/Extensions/MessageExtensions.cs b/src/Discord.Net.Commands/Extensions/MessageExtensions.cs
index 436f1bb98..e4a9f7de4 100644
--- a/src/Discord.Net.Commands/Extensions/MessageExtensions.cs
+++ b/src/Discord.Net.Commands/Extensions/MessageExtensions.cs
@@ -8,7 +8,7 @@ namespace Discord.Commands
public static class MessageExtensions
{
///
- /// Gets whether the message starts with the provided .
+ /// Gets whether the message starts with the provided character.
///
public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos)
{
@@ -21,7 +21,7 @@ namespace Discord.Commands
return false;
}
///
- /// Gets whether the message starts with the provided .
+ /// Gets whether the message starts with the provided string.
///
public static bool HasStringPrefix(this IUserMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal)
{
diff --git a/src/Discord.Net.Commands/Results/TypeReaderResult.cs b/src/Discord.Net.Commands/Results/TypeReaderResult.cs
index ea475bb46..ae0f89d6c 100644
--- a/src/Discord.Net.Commands/Results/TypeReaderResult.cs
+++ b/src/Discord.Net.Commands/Results/TypeReaderResult.cs
@@ -34,6 +34,8 @@ namespace Discord.Commands
///
public bool IsSuccess => !Error.HasValue;
+
+ /// TypeReaderResult was not successful.
public object BestMatch => IsSuccess
? (Values.Count == 1 ? Values.Single().Value : Values.OrderByDescending(v => v.Score).First().Value)
: throw new InvalidOperationException("TypeReaderResult was not successful.");
diff --git a/src/Discord.Net.Core/Entities/Messages/MessageProperties.cs b/src/Discord.Net.Core/Entities/Messages/MessageProperties.cs
index d52b309b5..c2892117a 100644
--- a/src/Discord.Net.Core/Entities/Messages/MessageProperties.cs
+++ b/src/Discord.Net.Core/Entities/Messages/MessageProperties.cs
@@ -4,7 +4,7 @@ namespace Discord
/// Properties that are used to modify an with the specified changes.
///
///
- /// The content of a message can be cleared with if and only if an is present.
+ /// The content of a message can be cleared with if and only if an is present.
///
///
///
diff --git a/src/Discord.Net.Rest/API/Common/InviteMetadata.cs b/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
index 586307523..a78017ffb 100644
--- a/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
+++ b/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CS1591
using Newtonsoft.Json;
using System;
diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
index 65b0da6a8..8976a8557 100644
--- a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
@@ -256,6 +256,7 @@ namespace Discord.Rest
}
//Users
+ /// Resolving permissions requires the parent guild to be downloaded.
public static async Task GetUserAsync(IGuildChannel channel, IGuild guild, BaseDiscordClient client,
ulong id, RequestOptions options)
{