/// <summary> /// Adds autocomplete command builder to <see cref="AutocompleteCommands"/>. /// </summary> /// <param name="name">Name of the command.</param> /// <param name="callback">Command callback to be executed.</param> /// <param name="configure"><see cref="AutocompleteCommandBuilder"/> factory.</param> /// <returns> /// The builder instance. /// </returns> public ModuleBuilder AddSlashCommand(string name, ExecuteCallback callback, Action <AutocompleteCommandBuilder> configure) { var command = new AutocompleteCommandBuilder(this, name, callback); configure(command); _autocompleteCommands.Add(command); return(this); }
/// <summary> /// Adds autocomplete command builder to <see cref="AutocompleteCommands"/>. /// </summary> /// <param name="configure"><see cref="AutocompleteCommands"/> factory.</param> /// <returns> /// The builder instance. /// </returns> public ModuleBuilder AddAutocompleteCommand(Action <AutocompleteCommandBuilder> configure) { var command = new AutocompleteCommandBuilder(this); configure(command); _autocompleteCommands.Add(command); return(this); }