예제 #1
0
        public DiscordHelper(string datacoreURL, ILogger logger, Searcher searcher, VoyImage voyImage, BotHelper botHelper)
        {
            _datacoreURL = datacoreURL;
            _logger      = logger;
            _voyImage    = voyImage;
            _searcher    = searcher;
            _botHelper   = botHelper;

            _itemFormatter = new ItemFormatter(_botHelper);
        }
예제 #2
0
        public DiscordHelper(string datacoreURL, string[] disabledGuilds, ILogger logger, Searcher searcher, VoyImage voyImage, BotHelper botHelper, string imgflipToken)
        {
            _datacoreURL    = datacoreURL;
            _logger         = logger;
            _voyImage       = voyImage;
            _searcher       = searcher;
            _botHelper      = botHelper;
            _imgflipToken   = imgflipToken;
            _disabledGuilds = disabledGuilds;

            _itemFormatter = new ItemFormatter(_botHelper);
        }
예제 #3
0
        public async Task <List <Item> > GetItems()
        {
            List <Item> list = new List <Item>();

            //TODO:

            list.AddRange(await Pizzas.Select(async p => await ItemFormatter.GetItem(p)).WhenAll());
            list.AddRange(await Sides.Select(async s => await ItemFormatter.GetItemFromSideId(s)).WhenAll());
            list.AddRange(await PreMadePizzas.Select(async p => await ItemFormatter.GetItemFromPizzaId(p)).WhenAll());
            if (list.Count == 0)
            {
                list.Add(ItemFormatter.EmptyItem());
            }
            return(list);
        }