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); }
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); }
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); }