예제 #1
0
        public static bool LoadInto(BotBitsClient client, ListeningBehavior listeningBehavior, params char[] commandPrefixes)
        {
            if (commandPrefixes.Length == 0)
            {
                throw new ArgumentException("At least one command prefix must be provided.", nameof(commandPrefixes));
            }

            return(LoadInto(client, new Settings(commandPrefixes, listeningBehavior)));
        }
예제 #2
0
파일: CakeSetup.cs 프로젝트: Yonom/BotCake
 public CakeSetup WithCommandsExtension(ListeningBehavior listeningBehavior, params char[] commandPrefixes)
 {
     this._actions += bot => CommandsExtension.LoadInto(bot, listeningBehavior, commandPrefixes);
     return(this);
 }
예제 #3
0
 public Settings(char[] commandPrefixes, ListeningBehavior listeningBehavior = ListeningBehavior.Both)
 {
     this.CommandPrefixes   = commandPrefixes;
     this.ListeningBehavior = listeningBehavior;
 }