public async Task TellAllStories()
        {
            //random element to break up up story text
            Random            rand    = new Random();
            List <StoryModel> stories = await _mongo.Fetch <StoryModel>("runescape", "stories", Builders <StoryModel> .Filter.Empty);

            foreach (var story in stories)
            {
                await _rsks.SendMessagesAsync(story.Messages);

                var waitTime = rand.Next(240000, 400000);
                await Task.Delay(waitTime);
            }
        }
Example #2
0
 private async Task PopulateTagActions()
 {
     _tagTemplates =
         await _mongo.Fetch <TagAnalysisTemplateModel>("pastebin", "tag_analysis", new MongoDB.Bson.BsonDocument());
 }