From 163e2a94f600ffe0f982e3f605264ff2f2fe312b Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Fri, 9 Feb 2024 16:33:14 +0100 Subject: Apply syntax style to LibMatrix side projects --- Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Utilities/LibMatrix.DevTestBot/Bot/Commands/CmdCommand.cs') 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 CanInvoke(CommandContext ctx) { - return Task.FromResult(ctx.MessageEvent.Sender.EndsWith(":rory.gay") || ctx.MessageEvent.Sender.EndsWith(":conduit.rory.gay")); - } + public Task 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 -- cgit 1.4.1