| @@ -60,10 +60,12 @@ namespace Discord.Commands | |||||
| public CommandService() : this(new CommandServiceConfig()) { } | public CommandService() : this(new CommandServiceConfig()) { } | ||||
| /// <summary> | /// <summary> | ||||
| /// Initializes a new <see cref="CommandService" /> class with the provided configuration. | |||||
| /// Initializes a new <see cref="CommandService"/> class with the provided configuration. | |||||
| /// </summary> | /// </summary> | ||||
| /// <param name="config">The configuration class.</param> | /// <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) | public CommandService(CommandServiceConfig config) | ||||
| { | { | ||||
| _caseSensitive = config.CaseSensitiveCommands; | _caseSensitive = config.CaseSensitiveCommands; | ||||
| @@ -132,6 +134,8 @@ namespace Discord.Commands | |||||
| /// <returns> | /// <returns> | ||||
| /// A built module. | /// A built module. | ||||
| /// </returns> | /// </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); | public Task<ModuleInfo> AddModuleAsync<T>(IServiceProvider services) => AddModuleAsync(typeof(T), services); | ||||
| /// <summary> | /// <summary> | ||||
| @@ -8,7 +8,7 @@ namespace Discord.Commands | |||||
| public static class MessageExtensions | public static class MessageExtensions | ||||
| { | { | ||||
| /// <summary> | /// <summary> | ||||
| /// Gets whether the message starts with the provided <see langword="char" />. | |||||
| /// Gets whether the message starts with the provided character. | |||||
| /// </summary> | /// </summary> | ||||
| public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos) | public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos) | ||||
| { | { | ||||
| @@ -21,7 +21,7 @@ namespace Discord.Commands | |||||
| return false; | return false; | ||||
| } | } | ||||
| /// <summary> | /// <summary> | ||||
| /// Gets whether the message starts with the provided <see langword="string" />. | |||||
| /// Gets whether the message starts with the provided string. | |||||
| /// </summary> | /// </summary> | ||||
| public static bool HasStringPrefix(this IUserMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal) | public static bool HasStringPrefix(this IUserMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal) | ||||
| { | { | ||||
| @@ -34,6 +34,8 @@ namespace Discord.Commands | |||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| public bool IsSuccess => !Error.HasValue; | public bool IsSuccess => !Error.HasValue; | ||||
| /// <exception cref="InvalidOperationException">TypeReaderResult was not successful.</exception> | |||||
| public object BestMatch => IsSuccess | public object BestMatch => IsSuccess | ||||
| ? (Values.Count == 1 ? Values.Single().Value : Values.OrderByDescending(v => v.Score).First().Value) | ? (Values.Count == 1 ? Values.Single().Value : Values.OrderByDescending(v => v.Score).First().Value) | ||||
| : throw new InvalidOperationException("TypeReaderResult was not successful."); | : throw new InvalidOperationException("TypeReaderResult was not successful."); | ||||
| @@ -4,7 +4,7 @@ namespace Discord | |||||
| /// Properties that are used to modify an <see cref="IUserMessage" /> with the specified changes. | /// Properties that are used to modify an <see cref="IUserMessage" /> with the specified changes. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | /// <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> | /// </remarks> | ||||
| /// <example> | /// <example> | ||||
| /// <code lang="c#"> | /// <code lang="c#"> | ||||
| @@ -1,4 +1,4 @@ | |||||
| #pragma warning disable CS1591 | |||||
| #pragma warning disable CS1591 | |||||
| using Newtonsoft.Json; | using Newtonsoft.Json; | ||||
| using System; | using System; | ||||
| @@ -256,6 +256,7 @@ namespace Discord.Rest | |||||
| } | } | ||||
| //Users | //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, | public static async Task<RestGuildUser> GetUserAsync(IGuildChannel channel, IGuild guild, BaseDiscordClient client, | ||||
| ulong id, RequestOptions options) | ulong id, RequestOptions options) | ||||
| { | { | ||||