Beispiel #1
0
        /// <summary>
        /// Initialize and run server modules.
        /// </summary>
        public async Task RunServer()
        {
            var diagnostic = Services.GetService <Diagnostic>();
            var logs       = Services.GetService <LoggingService>();

            BotChannel.RegisterDrawable(0, diagnostic.DiagnosticDrawable);
            BotChannel.RegisterDrawable(1, CocoritaModule.Drawable);
            BotChannel.RegisterDrawable(2, Player.Drawer);
            BotChannel.RegisterDrawable(3, logs.LogDrawable);

            new Task(async() => await BotChannel.StartAsync()).Start();
            new Task(async() => await AudioModule.StartAsync()).Start();
            new Task(async() => await CocoritaModule.StartAsync()).Start();

            await Task.CompletedTask;
        }