blob: 94007a52dfcb1a5d3beb068a4a7b5df838b0d37b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
using MatrixRoomUtils.Core.Responses;
using MatrixRoomUtils.Core.RoomTypes;
using MatrixRoomUtils.Core.StateEventTypes.Spec;
namespace MatrixRoomUtils.Bot.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..];
}
|