private void OnInitComplete(CakeStartedEvent e) { if (CommandsExtensionServices.IsAvailable()) { this.LoadCommands(); } }
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 } }
private void OnInitComplete(CakeStartedEvent e) { this.LoadCommands(); }