Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of <see cref="FailedCommandEvent" />.
 /// </summary>
 /// <param name="context">The the root-level command that was used</param>
 /// <param name="commandName">The name of the command that was used</param>
 /// <param name="arguments">The array of string arguments that were given to the command</param>
 /// <param name="badArguments">The list of arguments that failed being converted/parsed</param>
 public BadCommandArgumentEvent(RootCommandEvent context, string commandName, IEnumerable <string> arguments, IList <AbstractCommandArgument> badArguments) : base(context, commandName, arguments, FallbackType.BadArguments) =>
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of <see cref="CommandEvent" /> from <see cref="MessageEvent">a Created <see cref="Message">message</see></see>.
 /// </summary>
 /// <param name="context">The the root-level command that was used</param>
 /// <param name="commandName">The name of the command that was used</param>
 /// <param name="arguments">The array of string arguments that were given to the command</param>
 public CommandEvent(RootCommandEvent context, string commandName, IEnumerable <string> arguments) : base(context.MessageEvent.Message, context.MessageEvent.ServerId) =>
     (RootCommand, CommandName, Arguments, ParentClient) = (context, commandName, arguments, context.MessageEvent.ParentClient);
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of <see cref="FailedCommandEvent" />.
 /// </summary>
 /// <param name="context">The the root-level command that was used</param>
 /// <param name="commandName">The name of the command that was used</param>
 /// <param name="arguments">The array of string arguments that were given to the command</param>
 /// <param name="type">The type of the event that occurred</param>
 public FailedCommandEvent(RootCommandEvent context, string commandName, IEnumerable <string> arguments, FallbackType type) : base(context, commandName, arguments) =>