blob: 29a5a3f31e919c81854eb7cde9df507a47ed1ac2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
using LibMatrix.Homeservers;
using LibMatrix.Responses;
using LibMatrix.RoomTypes;
using LibMatrix.StateEventTypes.Spec;
namespace MediaModeratorPoC.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 AuthenticatedHomeserverGeneric Homeserver { get; set; }
}
|