Esempio n. 1
0
        public async Task <DougResponse> Profile(Command command)
        {
            var userId = command.IsUserArgument() ? command.GetTargetUserId() : command.UserId;
            var user   = _userRepository.GetUser(userId);

            if (command.IsUserArgument())
            {
                await _slack.SendEphemeralBlocks(new ShortProfileMenu(user).Blocks, command.UserId, command.ChannelId);

                return(NoResponse);
            }

            await _slack.SendEphemeralBlocks(new StatsMenu(user).Blocks, command.UserId, command.ChannelId);

            return(NoResponse);
        }
Esempio n. 2
0
        public async Task <DougResponse> Inventory(Command command)
        {
            var user = _userRepository.GetUser(command.UserId);

            await _slack.SendEphemeralBlocks(new InventoryMenu(user.InventoryItems).Blocks, command.UserId, command.ChannelId);

            return(new DougResponse());
        }
Esempio n. 3
0
        public async Task <DougResponse> ShowShop(User user, string channel, string shopId)
        {
            var shop = _shopRepository.GetShop(shopId);

            if (shop == null)
            {
                return(new DougResponse(DougMessages.UnknownShop));
            }

            await _slack.SendEphemeralBlocks(new ShopMenu(shop, user, _itemFactory, _governmentService).Blocks, user.Id, channel);

            return(new DougResponse());
        }
Esempio n. 4
0
        public async Task <DougResponse> Shop(Command command)
        {
            var items = new List <Item>
            {
                _itemFactory.CreateItem(ItemFactory.CoffeeCup),
                _itemFactory.CreateItem(ItemFactory.Apple),
                _itemFactory.CreateItem(ItemFactory.Bread),
                _itemFactory.CreateItem(ItemFactory.McdoFries)
            };

            await _slack.SendEphemeralBlocks(new ShopMenu(items).Blocks, command.UserId, command.ChannelId);

            return(NoResponse);
        }
Esempio n. 5
0
 private async Task ShowInvite(Party party, User user, string channel)
 {
     var blocks = new PartyInviteMenu(party, _userService).Blocks;
     await _slack.SendEphemeralBlocks(blocks, user.Id, channel);
 }