1 files changed, 25 insertions, 0 deletions
diff --git a/MiniUtils/Commands/OpsCommand.cs b/MiniUtils/Commands/OpsCommand.cs
new file mode 100644
index 0000000..eef6c6f
--- /dev/null
+++ b/MiniUtils/Commands/OpsCommand.cs
@@ -0,0 +1,25 @@
+using LibMatrix.Helpers;
+using LibMatrix.Utilities.Bot.Interfaces;
+using MiniUtils.Services;
+
+namespace MiniUtils.Commands;
+
+public class OpsCommand(IgnoreListManager ignoreListManager) : ICommand {
+ public string Name => "ops";
+
+ public string[]? Aliases => ["admins", "mods"];
+
+ public string Description => "Ping all the mods";
+
+ public bool Unlisted => true;
+
+ public async Task Invoke(CommandContext ctx) {
+ var pls = await ctx.Room.GetPowerLevelsAsync();
+ var msb = new MessageBuilder();
+ foreach (var pl in pls.Users.Where(x => x.Value >= pls.Kick)) {
+ msb = msb.WithMention(pl.Key).WithBody(" ");
+ }
+
+ await ctx.Room.SendMessageEventAsync(msb.Build());
+ }
+}
\ No newline at end of file
|