From f5447484512d726f4403f0d7725777d0a95601fb Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 19 Sep 2023 00:16:36 +0200 Subject: Add more stuff, add unit tests --- Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs | 7 +++---- Utilities/LibMatrix.Utilities.Bot/Interfaces/ICommand.cs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'Utilities/LibMatrix.Utilities.Bot/Interfaces') diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs index bdb93d5..97984fd 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs @@ -1,10 +1,9 @@ -using LibMatrix; +using LibMatrix.EventTypes.Spec; using LibMatrix.Homeservers; using LibMatrix.Responses; using LibMatrix.RoomTypes; -using LibMatrix.StateEventTypes.Spec; -namespace MediaModeratorPoC.Bot.Interfaces; +namespace LibMatrix.Utilities.Bot.Interfaces; public class CommandContext { public GenericRoom Room { get; set; } @@ -20,5 +19,5 @@ public class CommandContext { public string[] Args => MessageContentWithoutReply.Split(' ')[1..]; public AuthenticatedHomeserverGeneric Homeserver { get; set; } - public async Task Reply(string eventType, RoomMessageEventContent content) => await Room.SendMessageEventAsync(eventType, content); + public async Task Reply(RoomMessageEventContent content) => await Room.SendMessageEventAsync(content); } diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/ICommand.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/ICommand.cs index a8fce94..7065683 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/ICommand.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/ICommand.cs @@ -1,4 +1,4 @@ -namespace MediaModeratorPoC.Bot.Interfaces; +namespace LibMatrix.Utilities.Bot.Interfaces; public interface ICommand { public string Name { get; } -- cgit 1.4.1