about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-03-17 13:30:38 +0100
committerRory& <root@rory.gay>2024-03-17 13:30:38 +0100
commit677fe757733ab4af327ba74d047195be7d578e60 (patch)
treee4502c0ce8e021e0533f84706568669b36bbe0da /Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
parentAdd AddCollapsiblePart to MessageBuilder (diff)
downloadLibMatrix-677fe757733ab4af327ba74d047195be7d578e60.tar.xz
Bot related fixes, image size
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
index 062e99f..c6abde2 100644
--- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
+++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
@@ -14,8 +14,8 @@ public class CommandContext {
         .SkipWhile(x => x.StartsWith(">"))
         .Aggregate((x, y) => $"{x}\n{y}");
 
-    public string CommandName => MessageContentWithoutReply.Split(' ')[0][1..];
-    public string[] Args => MessageContentWithoutReply.Split(' ')[1..];
+    public required string CommandName;
+    public required string[] Args;
     public required AuthenticatedHomeserverGeneric Homeserver { get; set; }
 
     public async Task<EventIdResponse> Reply(RoomMessageEventContent content) => await Room.SendMessageEventAsync(content);