about summary refs log tree commit diff
path: root/ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-15 09:50:45 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-15 09:50:45 +0200
commit6bd02248ccfbcb46960a6f39eaad23888d190eb5 (patch)
tree110578f31b6f9f70a7a1edab32fb3a34d6ad4f1a /ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs
parentMedia moderator PoC works, abstract command handling to library (diff)
downloadLibMatrix-6bd02248ccfbcb46960a6f39eaad23888d190eb5.tar.xz
Some refactoring
Diffstat (limited to 'ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs')
-rw-r--r--ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs b/ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs
index ec61a1e..3715cb6 100644
--- a/ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs
+++ b/ExampleBots/LibMatrix.ExampleBot/Bot/Interfaces/CommandContext.cs
@@ -7,6 +7,6 @@ namespace LibMatrix.ExampleBot.Bot.Interfaces;
 public class CommandContext {
     public GenericRoom Room { get; set; }
     public StateEventResponse MessageEvent { get; set; }
-    public string CommandName => (MessageEvent.TypedContent as RoomMessageEventData).Body.Split(' ')[0][1..];
-    public string[] Args => (MessageEvent.TypedContent as RoomMessageEventData).Body.Split(' ')[1..];
+    public string CommandName => (MessageEvent.TypedContent as RoomMessageEventContent).Body.Split(' ')[0][1..];
+    public string[] Args => (MessageEvent.TypedContent as RoomMessageEventContent).Body.Split(' ')[1..];
 }