Skip to content

Commit

Permalink
Add XMLDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Still Hsu committed May 3, 2018
1 parent 929077d commit 02570a4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/Discord.Net.Commands/CommandService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ public class CommandService
public CommandService() : this(new CommandServiceConfig()) { }

/// <summary>
/// Initializes a new <see cref="CommandService" /> class with the provided configuration.
/// Initializes a new <see cref="CommandService"/> class with the provided configuration.
/// </summary>
/// <param name="config">The configuration class.</param>
/// <exception cref="InvalidOperationException">The <see cref="RunMode"/> is set to <see cref="RunMode.Default"/>.</exception>
/// <exception cref="InvalidOperationException">
/// The <see cref="RunMode"/> cannot be set to <see cref="RunMode.Default"/>.
/// </exception>
public CommandService(CommandServiceConfig config)
{
_caseSensitive = config.CaseSensitiveCommands;
Expand Down Expand Up @@ -132,6 +134,8 @@ public async Task<ModuleInfo> CreateModuleAsync(string primaryAlias, Action<Modu
/// <returns>
/// A built module.
/// </returns>
/// <exception cref="ArgumentException">This module has already been added.</exception>
/// <exception cref="InvalidOperationException">The <see cref="ModuleInfo"/> fails to be built; an invalid type may have been provided.</exception>
public Task<ModuleInfo> AddModuleAsync<T>(IServiceProvider services) => AddModuleAsync(typeof(T), services);

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Discord.Net.Commands/Extensions/MessageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Discord.Commands
public static class MessageExtensions
{
/// <summary>
/// Gets whether the message starts with the provided <see langword="char" />.
/// Gets whether the message starts with the provided character.
/// </summary>
public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos)
{
Expand All @@ -21,7 +21,7 @@ public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos)
return false;
}
/// <summary>
/// Gets whether the message starts with the provided <see langword="string" />.
/// Gets whether the message starts with the provided string.
/// </summary>
public static bool HasStringPrefix(this IUserMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Discord.Net.Commands/Results/TypeReaderResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public struct TypeReaderResult : IResult

/// <inheritdoc/>
public bool IsSuccess => !Error.HasValue;

/// <exception cref="InvalidOperationException">TypeReaderResult was not successful.</exception>
public object BestMatch => IsSuccess
? (Values.Count == 1 ? Values.Single().Value : Values.OrderByDescending(v => v.Score).First().Value)
: throw new InvalidOperationException("TypeReaderResult was not successful.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Discord
/// Properties that are used to modify an <see cref="IUserMessage" /> with the specified changes.
/// </summary>
/// <remarks>
/// The content of a message can be cleared with <see cref="string.Empty"/> if and only if an <see cref="Discord.Embed"> is present.
/// The content of a message can be cleared with <see cref="string.Empty"/> if and only if an <see cref="Discord.Embed"/> is present.
/// </remarks>
/// <example>
/// <code lang="c#">
Expand Down
2 changes: 1 addition & 1 deletion src/Discord.Net.Rest/API/Common/InviteMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CS1591
using Newtonsoft.Json;
using System;

Expand Down
1 change: 1 addition & 0 deletions src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public static async Task RemovePermissionOverwriteAsync(IGuildChannel channel, B
}

//Users
/// <exception cref="InvalidOperationException">Resolving permissions requires the parent guild to be downloaded.</exception>
public static async Task<RestGuildUser> GetUserAsync(IGuildChannel channel, IGuild guild, BaseDiscordClient client,
ulong id, RequestOptions options)
{
Expand Down

0 comments on commit 02570a4

Please sign in to comment.