From cc31b4a2bef780abaf496bff50ce5e7602d8a6e1 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 15 Sep 2023 09:50:45 +0200 Subject: Some refactoring --- Bot/Interfaces/CommandContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bot/Interfaces/CommandContext.cs') 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..]; } -- cgit 1.5.1