public async Task Execute(IChatService chatService, string userName, bool isModerator, bool isVip, bool isBroadcaster, ReadOnlyMemory <char> rhs)
        {
            if (!(isModerator || isBroadcaster))
            {
                return;
            }

            _TrainHat.StartTraining();
            await chatService.SendMessageAsync("Started taking screenshots, 1 every ten seconds for the next 150 seconds");
        }
Esempio n. 2
0
        public async Task Execute(IChatService chatService, string userName, bool isModerator, bool isVip, bool isBroadcaster, ReadOnlyMemory <char> rhs)
        {
            if (!(isModerator || isBroadcaster))
            {
                return;
            }

            int.TryParse(rhs.ToString(), out var picCount);
            picCount = (picCount < 1) ? ScreenshotTrainingService.DefaultTrainingCount : picCount;
            _TrainHat.StartTraining(picCount);
            await _HubContext.Clients.All.SendAsync("shutter");

            await chatService.SendMessageAsync($"Started taking screenshots, 1 every {ScreenshotTrainingService.TrainingIntervalInSeconds} seconds for the next {ScreenshotTrainingService.TrainingIntervalInSeconds * picCount} seconds");
        }