diff options
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/Commands')
-rw-r--r-- | Utilities/LibMatrix.Utilities.Bot/Commands/HelpCommand.cs | 8 | ||||
-rw-r--r-- | Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Commands/HelpCommand.cs b/Utilities/LibMatrix.Utilities.Bot/Commands/HelpCommand.cs index de033ef..4fe1038 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Commands/HelpCommand.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Commands/HelpCommand.cs @@ -1,9 +1,9 @@ using System.Text; -using LibMatrix.StateEventTypes.Spec; -using MediaModeratorPoC.Bot.Interfaces; +using LibMatrix.EventTypes.Spec; +using LibMatrix.Utilities.Bot.Interfaces; using Microsoft.Extensions.DependencyInjection; -namespace MediaModeratorPoC.Bot.Commands; +namespace LibMatrix.Utilities.Bot.Commands; public class HelpCommand(IServiceProvider services) : ICommand { public string Name { get; } = "help"; @@ -17,6 +17,6 @@ public class HelpCommand(IServiceProvider services) : ICommand { sb.AppendLine($"- {command.Name}: {command.Description}"); } - await ctx.Room.SendMessageEventAsync("m.room.message", new RoomMessageEventContent(messageType: "m.notice", body: sb.ToString())); + await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent(messageType: "m.notice", body: sb.ToString())); } } diff --git a/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs b/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs index b008be9..16712ea 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs @@ -1,13 +1,13 @@ -using LibMatrix.StateEventTypes.Spec; -using MediaModeratorPoC.Bot.Interfaces; +using LibMatrix.EventTypes.Spec; +using LibMatrix.Utilities.Bot.Interfaces; -namespace MediaModeratorPoC.Bot.Commands; +namespace LibMatrix.Utilities.Bot.Commands; public class PingCommand : ICommand { public string Name { get; } = "ping"; public string Description { get; } = "Pong!"; public async Task Invoke(CommandContext ctx) { - await ctx.Room.SendMessageEventAsync("m.room.message", new RoomMessageEventContent(body: "pong!")); + await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent(body: "pong!")); } } |