Пример #1
0
 private void OnInitComplete(CakeStartedEvent e)
 {
     if (CommandsExtensionServices.IsAvailable())
     {
         this.LoadCommands();
     }
 }
Пример #2
0
        protected BotBase()
        {
            this._botBits = CakeServices.Client;
            if (this._botBits == null)
            {
                throw new InvalidOperationException(
                          "Please call CakeServices.WithClient before creating new BotBase objects.");
            }

            if (CakeServices.Starting)
            {
                CakeStartedEvent.Of(this._botBits).Bind(this.OnInitComplete);
            }

            this.EventLoader.Load(this);

            if (CommandsExtensionServices.IsAvailable())
            {
                this.LoadCommands(); // Try to load commands as soon as possible
            }
        }
Пример #3
0
 private void OnInitComplete(CakeStartedEvent e)
 {
     this.LoadCommands();
 }