using LibMatrix.Homeservers; using LibMatrix.Utilities.Bot.Interfaces; namespace MiniUtils.Commands; public class DeleteRoomCommand() : ICommand { public string Name => "delete room"; public string[]? Aliases => ["deleteroom"]; public string Description => "Delete a room"; public bool Unlisted => false; public async Task Invoke(CommandContext ctx) { if (ctx.Homeserver is not AuthenticatedHomeserverSynapse synapse) return; var res = await synapse.Admin.DeleteRoom(ctx.Args[0], new() { Purge = true }, waitForCompletion: false); } }