Exemplo n.º 1
0
 public PromptCollection(
     InteractivePromptBase module,
     string?errorMessage = null, IServiceProvider?services = null)
 {
     ErrorMessage = errorMessage;
     Module       = module;
     Services     = services;
     Criteria     = new ICriterion <SocketMessage>[]
     {
         new EnsureSourceChannelCriterion(),
         new EnsureSourceUserCriterion()
     };
 }
Exemplo n.º 2
0
 public static PromptCollection <T> CreatePromptCollection <T>(
     this InteractivePromptBase context,
     string?errorMessage = null)
     where T : notnull =>
 new PromptCollection <T>(context, errorMessage);