about summary refs log tree commit diff
path: root/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs')
-rw-r--r--Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs b/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
index e690890..89a9033 100644
--- a/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
+++ b/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
@@ -8,9 +8,7 @@ public class CmdCommand : ICommand {
     public string Name => "cmd";
     public string Description => "Runs a command on the host system";
 
-    public Task<bool> CanInvoke(CommandContext ctx) {
-        return Task.FromResult(ctx.MessageEvent.Sender.EndsWith(":rory.gay") || ctx.MessageEvent.Sender.EndsWith(":conduit.rory.gay"));
-    }
+    public Task<bool> CanInvoke(CommandContext ctx) => Task.FromResult(ctx.MessageEvent.Sender.EndsWith(":rory.gay") || ctx.MessageEvent.Sender.EndsWith(":conduit.rory.gay"));
 
     public async Task Invoke(CommandContext ctx) {
         var cmd = ctx.Args.Aggregate("\"", (current, arg) => current + arg + " ");
@@ -27,7 +25,7 @@ public class CmdCommand : ICommand {
         // .Split("\n").ToList();
 
         var msg = "";
-        EventIdResponse? msgId = await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent {
+        var msgId = await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent {
             FormattedBody = $"Waiting for command output...",
             Body = msg.RemoveAnsi(),
             Format = "m.notice"
@@ -69,4 +67,4 @@ public class CmdCommand : ICommand {
         //     }
         // }
     }
-}
+}
\ No newline at end of file