littleshop/TeleBot/TeleBot/BotScript.cs
SysAdmin e1b377a042 Initial commit of LittleShop project (excluding large archives)
- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 15:07:38 +01:00

48 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TeleBot
{
public class BotScript
{
public string WelcomeText { get; set; }
public Dictionary<Guid, BotOption> Questions { get; internal set; } = new Dictionary<Guid, BotOption>();
public Dictionary<Guid, string> Answers { get; internal set; } = new Dictionary<Guid, string>();
public int Stage { get; set; }
public static BotScript CreateBotScript(string welcomeText)
{
var bs = new BotScript();
bs.WelcomeText = welcomeText;
return bs;
}
public void AddScaledQuestion(string question)
{
AddQuestion(question, ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]);
}
public void AddQuestion(string question, string[] answers)
{
var q = new BotOption();
q.Order = Questions.Count() + 1;
q.Text = question;
q.Options = answers;
Questions.Add(q.Id,q);
}
}
public class BotOption
{
public Guid Id { get; set; } = Guid.NewGuid();
public int Order { get; set; }
public string Text { get; set; }
public string[] Options { get; set; }
}
}