about summary refs log tree commit diff
path: root/ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-01-31 18:50:16 +0100
committerRory& <root@rory.gay>2024-01-31 18:50:16 +0100
commitd133a168c17d605236e967ff63728420ddb0ed98 (patch)
treeac467c42591db6fb6b920682dd54da1f707f8c0c /ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs
parentCapabilities (diff)
downloadLibMatrix-d133a168c17d605236e967ff63728420ddb0ed98.tar.xz
Repo split
Diffstat (limited to '')
-rw-r--r--ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs48
1 files changed, 0 insertions, 48 deletions
diff --git a/ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs b/ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs
deleted file mode 100644
index b2216d1..0000000
--- a/ExampleBots/ModerationBot/Commands/DbgAniRainbowTest.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System.Diagnostics;
-using LibMatrix.EventTypes.Spec;
-using LibMatrix.Helpers;
-using LibMatrix.RoomTypes;
-using LibMatrix.Services;
-using LibMatrix.Utilities.Bot.Interfaces;
-using ModerationBot.AccountData;
-
-namespace ModerationBot.Commands;
-
-public class DbgAniRainbowTest(IServiceProvider services, HomeserverProviderService hsProvider, HomeserverResolverService hsResolver, PolicyEngine engine) : ICommand {
-    public string Name { get; } = "dbg-ani-rainbow";
-    public string Description { get; } = "[Debug] animated rainbow :)";
-    private GenericRoom logRoom { get; set; }
-
-    public async Task<bool> CanInvoke(CommandContext ctx) {
-        return ctx.Room.RoomId == "!DoHEdFablOLjddKWIp:rory.gay";
-    }
-
-    public async Task Invoke(CommandContext ctx) {
-        //255 long string
-        // var rainbow = "🟥🟧🟨🟩🟦🟪";
-        var rainbow = "M";
-        var chars = rainbow;
-        for (var i = 0; i < 76; i++) {
-            chars += rainbow[i%rainbow.Length];
-        }
-
-        var msg = new MessageBuilder(msgType: "m.notice").WithRainbowString(chars).Build();
-        var msgEvent = await ctx.Room.SendMessageEventAsync(msg);
-        
-        Task.Run(async () => {
-
-            int i = 0;
-            while (true) {
-                msg = new MessageBuilder(msgType: "m.notice").WithRainbowString(chars, offset: i+=5).Build();
-                    // .SetReplaceRelation<RoomMessageEventContent>(msgEvent.EventId);
-                // msg.Body = "";
-                // msg.FormattedBody = "";
-                var sw = Stopwatch.StartNew();
-                await ctx.Room.SendMessageEventAsync(msg);
-                await Task.Delay(sw.Elapsed);
-            }
-            
-        });
-
-    }
-}
\ No newline at end of file