From 6bd02248ccfbcb46960a6f39eaad23888d190eb5 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 15 Sep 2023 09:50:45 +0200 Subject: Some refactoring --- .../PluralContactBotPoC/Bot/AccountData/BotData.cs | 16 ++++++++++++++++ .../PluralContactBotPoC/Bot/AccountData/SystemData.cs | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ExampleBots/PluralContactBotPoC/Bot/AccountData/BotData.cs create mode 100644 ExampleBots/PluralContactBotPoC/Bot/AccountData/SystemData.cs (limited to 'ExampleBots/PluralContactBotPoC/Bot/AccountData') diff --git a/ExampleBots/PluralContactBotPoC/Bot/AccountData/BotData.cs b/ExampleBots/PluralContactBotPoC/Bot/AccountData/BotData.cs new file mode 100644 index 0000000..9477488 --- /dev/null +++ b/ExampleBots/PluralContactBotPoC/Bot/AccountData/BotData.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using LibMatrix.Helpers; +using LibMatrix.Interfaces; + +namespace PluralContactBotPoC.Bot.AccountData; +[MatrixEvent(EventName = "gay.rory.plural_contact_bot.bot_config")] +public class BotData : EventContent { + [JsonPropertyName("control_room")] + public string ControlRoom { get; set; } = ""; + + [JsonPropertyName("log_room")] + public string? LogRoom { get; set; } = ""; + + [JsonPropertyName("policy_room")] + public string? PolicyRoom { get; set; } = ""; +} diff --git a/ExampleBots/PluralContactBotPoC/Bot/AccountData/SystemData.cs b/ExampleBots/PluralContactBotPoC/Bot/AccountData/SystemData.cs new file mode 100644 index 0000000..5edfc0e --- /dev/null +++ b/ExampleBots/PluralContactBotPoC/Bot/AccountData/SystemData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; +using LibMatrix.Helpers; +using LibMatrix.Interfaces; + +namespace PluralContactBotPoC.Bot.StateEventTypes; + +[MatrixEvent(EventName = "gay.rory.plural_contact_bot.system_data")] +public class SystemData : EventContent { + [JsonPropertyName("control_room")] + public string ControlRoom { get; set; } = null!; + [JsonPropertyName("system_members")] + public List Members { get; set; } = new(); + [JsonPropertyName("dm_space")] + public string? DmSpace { get; set; } +} -- cgit 1.4.1