/// Adds a modal command builder to <see cref="ModalCommands"/>. /// </summary> /// <param name="configure"><see cref="ModalCommands"/> factory.</param> /// <returns> /// The builder instance. /// </returns> public ModuleBuilder AddModalCommand(Action <ModalCommandBuilder> configure) { var command = new ModalCommandBuilder(this); configure(command); _modalCommands.Add(command); return(this); }
internal ModalCommandInfo(Builders.ModalCommandBuilder builder, ModuleInfo module, InteractionService commandService) : base(builder, module, commandService) { Parameters = builder.Parameters.Select(x => x.Build(this)).ToImmutableArray(); Modal = Parameters.Last().Modal; }