示例#1
0
        public void EndCoffee(string channelId)
        {
            var participants   = _coffeeRepository.GetReadyParticipants().ToList();
            var participantsId = participants.Select(user => user.Id).ToList();

            _creditsRepository.AddCreditsToUsers(participantsId, CoffeeBreakAward);
            _inventoryRepository.AddItemToUsers(participants, new CoffeeCup(_statsRepository, _inventoryRepository));

            _userService.AddBulkExperience(participants, CoffeeExperienceAward, channelId).Wait();

            _coffeeRepository.ResetRoster();
            _coffeeRepository.EndCoffeeBreak();

            _slack.BroadcastMessage(DougMessages.BackToWork, channelId);
        }