From 5bb94daff7ce92cf3010ed0e64da8eae34e9ab76 Mon Sep 17 00:00:00 2001 From: mctaylors Date: Mon, 1 Apr 2024 15:01:44 +0300 Subject: [PATCH] we do a little trolling --- src/Commands/AboutCommandGroup.cs | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/Commands/AboutCommandGroup.cs b/src/Commands/AboutCommandGroup.cs index 027e7f8..8fac079 100644 --- a/src/Commands/AboutCommandGroup.cs +++ b/src/Commands/AboutCommandGroup.cs @@ -1,4 +1,5 @@ ๏ปฟusing System.ComponentModel; +using System.Drawing; using System.Text; using JetBrains.Annotations; using Octobot.Data; @@ -79,6 +80,12 @@ public class AboutCommandGroup : CommandGroup var cfg = await _guildData.GetSettings(guildId, CancellationToken); Messages.Culture = GuildSettings.Language.Get(cfg); + var today = DateTime.Today; + if (today.Month is 4 && today.Day is 1) + { + return await SendNotAboutBotAsync(bot, CancellationToken); + } + return await SendAboutBotAsync(bot, guildId, CancellationToken); } @@ -134,4 +141,57 @@ public class AboutCommandGroup : CommandGroup new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton }) }), ct); } + + private async Task SendNotAboutBotAsync(IUser bot, CancellationToken ct = default) + { + var builder = new StringBuilder().AppendLine("### maintainers"); + builder.AppendBulletPointLine("@mctaylors โ€” maintainer of the whole joke") + .AppendBulletPointLine("@Octol1ttle โ€” Octobot developer") + .AppendBulletPointLine("@neroduckale โ€” cool dude"); + + Color[] colors = + [ + ColorsList.Red, + ColorsList.Green, + ColorsList.Yellow, + ColorsList.Blue, + ColorsList.Magenta + ]; + + var embed = new EmbedBuilder() + .WithSmallTitle("about inkbot", bot) + .WithDescription(builder.ToString()) + .WithColour(colors[Random.Shared.Next(colors.Length)]) + .WithImageUrl("https://i.ibb.co/QPzXLxm/inkbot-banner.png") + .WithFooter($"foolish version: {BuildInfo.Version}") + .Build(); + + var repositoryButton = new ButtonComponent( + ButtonComponentStyle.Link, + "inkbot's source code", + new PartialEmoji(Name: "๐ŸŒ"), + URL: BuildInfo.RepositoryUrl + ); + + var wikiButton = new ButtonComponent( + ButtonComponentStyle.Link, + "open inkbot's wiki", + new PartialEmoji(Name: "๐Ÿ“–"), + URL: BuildInfo.WikiUrl + ); + + var issuesButton = new ButtonComponent( + ButtonComponentStyle.Link, + "can't", + new PartialEmoji(Name: "\u26d4"), + URL: BuildInfo.IssuesUrl, + IsDisabled: true + ); + + return await _feedback.SendContextualEmbedResultAsync(embed, + new FeedbackMessageOptions(MessageComponents: new[] + { + new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton }) + }), ct); + } }