about summary refs log tree commit diff
path: root/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
commitcc31b4a2bef780abaf496bff50ce5e7602d8a6e1 (patch)
treef25a87c79cdfeb853146c5312b8990f644c71eae /Bot/Interfaces/CommandContext.cs
parentMedia moderator PoC works, abstract command handling to library (diff)
downloadLibMatrix.ExampleBot-cc31b4a2bef780abaf496bff50ce5e7602d8a6e1.tar.xz
Some refactoring
Diffstat (limited to 'Bot/Interfaces/CommandContext.cs')
-rw-r--r--Bot/Interfaces/CommandContext.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bot/Interfaces/CommandContext.cs b/Bot/Interfaces/CommandContext.cs

index ec61a1e..3715cb6 100644 --- a/Bot/Interfaces/CommandContext.cs +++ b/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..]; }