about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/Commands
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-30 09:46:43 +0000
committerRory& <root@rory.gay>2024-05-30 09:46:43 +0000
commit30a0868789466012bab869af4300aef5a9cac108 (patch)
tree12790166e4d2c01a141928143b9b4d96dd08ace8 /Utilities/LibMatrix.Utilities.Bot/Commands
parentClarify LegacyEvent types (diff)
downloadLibMatrix-30a0868789466012bab869af4300aef5a9cac108.tar.xz
Rename legacy event types
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/Commands')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/Commands/AliassesCommand.cs2
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Commands/AliassesCommand.cs b/Utilities/LibMatrix.Utilities.Bot/Commands/AliassesCommand.cs
index 68fc884..aaa61ed 100644
--- a/Utilities/LibMatrix.Utilities.Bot/Commands/AliassesCommand.cs
+++ b/Utilities/LibMatrix.Utilities.Bot/Commands/AliassesCommand.cs
@@ -19,7 +19,7 @@ public class AliassesCommand(IServiceProvider services) : ICommand {
         var commands = services.GetServices<ICommand>().Where(x => !x.Unlisted).ToList();
         foreach (var command in commands) sb.AppendLine($"- {command.Name}: {command.Description}");
 
-        await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent("m.notice", sb.ToString()));
+        await ctx.Room.SendMessageEventAsync(new RoomMessageLegacyEventContent("m.notice", sb.ToString()));
         
         var msb = new MessageBuilder("m.notice");
         msb.WithHtmlTag("table", tb => {
diff --git a/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs b/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs
index 04d5124..15a1ea1 100644
--- a/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs
+++ b/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs
@@ -9,5 +9,5 @@ public class PingCommand : ICommand {
     public string Description { get; } = "Pong!";
     public bool Unlisted { get; }
 
-    public async Task Invoke(CommandContext ctx) => await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent(body: "pong!"));
+    public async Task Invoke(CommandContext ctx) => await ctx.Room.SendMessageEventAsync(new RoomMessageLegacyEventContent(body: "pong!"));
 }
\ No newline at end of file