public async static Task <List <string> > GetChatProfiles() { var config = await DbBotCollection.FindOneById(BotAlphaName); if (config == null) { var botModel = new BotModel(); botModel._id = BotAlphaName; config = await DbBotCollection.InsertNewOrUpdate(botModel); } return(config?.Configuration?.ChatProfiles?.Select(item => item.Name).ToList()); }
public async static Task <string> GetActiveProfile() => (await DbBotCollection.FindOneById(BotAlphaName))?.Configuration?.ActiveProfile;