about summary refs log tree commit diff
path: root/Commands/JoinSpaceMembersCommand.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-03-22 17:43:00 +0100
committerRory& <root@rory.gay>2024-03-22 17:43:00 +0100
commitc137f94aeb122c636629fb9361dd73626594f690 (patch)
tree44f04e0b2b026d21c817e330918243fd5a4a8cd4 /Commands/JoinSpaceMembersCommand.cs
parentChanges (diff)
downloadModerationBot-c137f94aeb122c636629fb9361dd73626594f690.tar.xz
Changes
Diffstat (limited to '')
-rw-r--r--Commands/JoinSpaceMembersCommand.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Commands/JoinSpaceMembersCommand.cs b/Commands/JoinSpaceMembersCommand.cs

index 6564e71..86ecf7e 100644 --- a/Commands/JoinSpaceMembersCommand.cs +++ b/Commands/JoinSpaceMembersCommand.cs
@@ -10,7 +10,9 @@ namespace ModerationBot.Commands; public class JoinSpaceMembersCommand(IServiceProvider services, HomeserverProviderService hsProvider, HomeserverResolverService hsResolver, PolicyEngine engine) : ICommand { public string Name { get; } = "joinspacemembers"; + public string[]? Aliases { get; } public string Description { get; } = "Join all rooms in space"; + public bool Unlisted { get; } private GenericRoom logRoom { get; set; } public async Task<bool> CanInvoke(CommandContext ctx) { @@ -30,14 +32,12 @@ public class JoinSpaceMembersCommand(IServiceProvider services, HomeserverProvid public async Task Invoke(CommandContext ctx) { var botData = await ctx.Homeserver.GetAccountDataAsync<BotData>("gay.rory.moderation_bot_data"); logRoom = ctx.Homeserver.GetRoom(botData.LogRoom ?? botData.ControlRoom); - var currentRooms = (await ctx.Homeserver.GetJoinedRooms()).Select(x=>x.RoomId).ToList(); + var currentRooms = (await ctx.Homeserver.GetJoinedRooms()).Select(x => x.RoomId).ToList(); await logRoom.SendMessageEventAsync(MessageFormatter.FormatSuccess($"Joining space children of {ctx.Args[0]} with reason: {string.Join(' ', ctx.Args[1..])}")); var roomId = ctx.Args[0]; var servers = new List<string>() { ctx.Homeserver.ServerName }; - if (roomId.StartsWith('[')) { - - } + if (roomId.StartsWith('[')) { } if (roomId.StartsWith('#')) { var res = await ctx.Homeserver.ResolveRoomAliasAsync(roomId); @@ -70,4 +70,4 @@ public class JoinSpaceMembersCommand(IServiceProvider services, HomeserverProvid return true; } -} +} \ No newline at end of file