about summary refs log tree commit diff
path: root/MatrixRoomUtils.Bot/Bot/Interfaces
diff options
context:
space:
mode:
authorEmma@Rory& <root@rory.gay>2023-08-14 05:07:51 +0200
committerEmma@Rory& <root@rory.gay>2023-08-14 05:11:21 +0200
commitaa7026a17ededf7c181ed269c6388491d96e1b1e (patch)
tree963b45cebbfefb3c5cebaf4ba7134a0e32eb0147 /MatrixRoomUtils.Bot/Bot/Interfaces
parentAdd latest code before splitting projects (diff)
downloadMatrixUtils-aa7026a17ededf7c181ed269c6388491d96e1b1e.tar.xz
Split LibMatrix into submodule
Diffstat (limited to 'MatrixRoomUtils.Bot/Bot/Interfaces')
-rw-r--r--MatrixRoomUtils.Bot/Bot/Interfaces/CommandContext.cs12
-rw-r--r--MatrixRoomUtils.Bot/Bot/Interfaces/ICommand.cs12
2 files changed, 0 insertions, 24 deletions
diff --git a/MatrixRoomUtils.Bot/Bot/Interfaces/CommandContext.cs b/MatrixRoomUtils.Bot/Bot/Interfaces/CommandContext.cs
deleted file mode 100644

index 94007a5..0000000 --- a/MatrixRoomUtils.Bot/Bot/Interfaces/CommandContext.cs +++ /dev/null
@@ -1,12 +0,0 @@ -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..]; -} \ No newline at end of file diff --git a/MatrixRoomUtils.Bot/Bot/Interfaces/ICommand.cs b/MatrixRoomUtils.Bot/Bot/Interfaces/ICommand.cs deleted file mode 100644
index 20805b1..0000000 --- a/MatrixRoomUtils.Bot/Bot/Interfaces/ICommand.cs +++ /dev/null
@@ -1,12 +0,0 @@ -namespace MatrixRoomUtils.Bot.Bot.Interfaces; - -public interface ICommand { - public string Name { get; } - public string Description { get; } - - public Task<bool> CanInvoke(CommandContext ctx) { - return Task.FromResult(true); - } - - public Task Invoke(CommandContext ctx); -} \ No newline at end of file