Exemplo n.º 1
0
        ///     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);
        }
Exemplo n.º 2
0
 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;
 }