about summary refs log tree commit diff
path: root/Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-05 00:58:08 +0100
committerRory& <root@rory.gay>2025-12-05 00:58:08 +0100
commit741cc856e3546828bc127da03166067eb2053f43 (patch)
tree17bb8e7a07f1b895fa583b38fd2364a17bd26ae5 /Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs
parentEvent content redaction (v12) (diff)
downloadLibMatrix-741cc856e3546828bc127da03166067eb2053f43.tar.xz
Drop dev test bot
Diffstat (limited to 'Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs')
-rw-r--r--Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs22
1 files changed, 0 insertions, 22 deletions
diff --git a/Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs b/Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs
deleted file mode 100644

index 33bbc5a..0000000 --- a/Utilities/LibMatrix.DevTestBot/Bot/Commands/HelpCommand.cs +++ /dev/null
@@ -1,22 +0,0 @@ -using System.Text; -using LibMatrix.EventTypes.Spec; -using LibMatrix.Utilities.Bot.Interfaces; -using Microsoft.Extensions.DependencyInjection; - -namespace LibMatrix.ExampleBot.Bot.Commands; - -public class HelpCommand(IServiceProvider services) : ICommand { - public string Name { get; } = "help"; - public string[]? Aliases => []; - public bool Unlisted => false; - public string Description { get; } = "Displays this help message"; - - public async Task Invoke(CommandContext ctx) { - var sb = new StringBuilder(); - sb.AppendLine("Available commands:"); - var commands = services.GetServices<ICommand>().ToList(); - foreach (var command in commands) sb.AppendLine($"- {command.Name}: {command.Description}"); - - await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent(body: sb.ToString())); - } -} \ No newline at end of file