Esempio n. 1
0
 public bool ContainsParameterOfType(DiscordCommandParameterType type)
 {
     if (Parameters == null)
     {
         return(false);
     }
     foreach (var param in Parameters)
     {
         if (param.parameterType == type)
         {
             return(true);
         }
     }
     return(false);
 }
 public DiscordCommandParameter(string parameterName, string parameterDescription = "", DiscordCommandParameterType parameterType = DiscordCommandParameterType.Required)
 {
     this.parameterName        = parameterName;
     this.parameterDescription = parameterDescription;
     this.parameterType        = parameterType;
 }
 public DiscordCommandBuilder AddParameter(string name, DiscordCommandParameterType type, string desc = "")
 {
     Command.Parameters.Add(new DiscordCommandParameter(name, desc, type));
     return(this);
 }
Esempio n. 4
0
 public DiscordCommandParameter Type(DiscordCommandParameterType type)
 {
     this.parameterType = type;
     return(this);
 }
Esempio n. 5
0
 public bool ContainsParameterOfType(DiscordCommandParameterType type)
 {
     return(Parameters.Where(t => t.parameterType == type).Count() > 0);
 }