コード例 #1
0
 public static ParseResult FromError(InteractionCommandError error, string reason) =>
 new ParseResult(null, error, reason);
コード例 #2
0
 /// <summary>
 ///     Initializes a new <see cref="SearchResult{T}" /> with a specified <see cref="InteractionCommandError" /> and its
 ///     reason, indicating an unsuccessful execution.
 /// </summary>
 /// <param name="error">The type of error.</param>
 /// <param name="reason">The reason behind the error.</param>
 /// <returns>
 ///     A <see cref="SearchResult{T}" /> that contains a <see cref="InteractionCommandError" /> and reason.
 /// </returns>
 public static SearchResult <T> FromError(string text, InteractionCommandError error, string reason) =>
 new SearchResult <T>(text, null, null, error, reason);
コード例 #3
0
 /// <summary>
 ///     Returns a <see cref="PreconditionResult" /> with the specified error and the reason.
 /// </summary>
 /// <param name="error">The type of error.</param>
 /// <param name="reason">The reason of failure.</param>
 public static TypeConverterResult FromError(InteractionCommandError error, string reason) =>
 new TypeConverterResult(null, error, reason);
コード例 #4
0
 /// <summary>
 ///     Initializes a new <see cref="AutocompletionResult" /> with a specified <see cref="InteractionCommandError" /> and its
 ///     reason, indicating an unsuccessful execution.
 /// </summary>
 /// <param name="error">The type of error.</param>
 /// <param name="reason">The reason behind the error.</param>
 /// <returns>
 ///     A <see cref="AutocompletionResult" /> that contains a <see cref="InteractionCommandError" /> and reason.
 /// </returns>
 public static AutocompletionResult FromError(InteractionCommandError error, string reason) =>
 new AutocompletionResult(null, error, reason);
コード例 #5
0
 /// <summary>
 ///     Initializes a new <see cref="ExecuteResult" /> with a specified <see cref="InteractionCommandError" /> and its
 ///     reason, indicating an unsuccessful execution.
 /// </summary>
 /// <param name="commandError">The type of error.</param>
 /// <param name="reason">The reason behind the error.</param>
 /// <returns>
 ///     A <see cref="ExecuteResult" /> that contains a <see cref="InteractionCommandError" /> and reason.
 /// </returns>
 public static ExecuteResult FromError(InteractionCommandError commandError, string reason) =>
 new ExecuteResult(null, commandError, reason);