about summary refs log tree commit diff
path: root/Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2024-02-09 16:33:14 +0100
committerEmma [it/its]@Rory& <root@rory.gay>2024-02-09 16:33:14 +0100
commit163e2a94f600ffe0f982e3f605264ff2f2fe312b (patch)
treeaf8fb4c8c468dde726a4773b1304aa22c59186ac /Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs
parentApply syntax style to LibMatrix (diff)
downloadLibMatrix-163e2a94f600ffe0f982e3f605264ff2f2fe312b.tar.xz
Apply syntax style to LibMatrix side projects
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