コード例 #1
0
ファイル: BotBase.cs プロジェクト: Yonom/BotCake
 private void OnInitComplete(CakeStartedEvent e)
 {
     if (CommandsExtensionServices.IsAvailable())
     {
         this.LoadCommands();
     }
 }
コード例 #2
0
ファイル: BotBase.cs プロジェクト: Yonom/BotCake
        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
ファイル: BotBase.cs プロジェクト: Yonom/BotCake
 private void OnInitComplete(CakeStartedEvent e)
 {
     this.LoadCommands();
 }