Beispiel #1
0
        public void Initialize()
        {
            //Sets a fake fixed time in order to better check the elapsed string returned by the formatter
            fakeTime = new DateTime(2000, 1, 1, 15, 5, 10);

            sut = new StoryFormatter();
        }
        private static async Task _displayStep(IDMChannel dmChannel, DialogStep currentStep)
        {
            if (!string.IsNullOrEmpty(currentStep.ImageUrl))
            {
                var emb = new EmbedBuilder()
                {
                    ImageUrl = currentStep.ImageUrl
                };
                await dmChannel.SendMessageAsync("", false, emb.Build());
            }
            var nextDialog = new StoryFormatter()
                             .AddText(currentStep);

            if (currentStep.PossibleChoices.Count > 0)
            {
                nextDialog.AddOptions(currentStep.PossibleChoices.Keys.ToList());
            }

            await dmChannel.SendMessageAsync(nextDialog.BuildDialog(), false);
        }