From 19acd6479c73aca86bc7dfe76166c066bd462365 Mon Sep 17 00:00:00 2001 From: TeBeCo Date: Thu, 23 Nov 2023 21:55:55 +0400 Subject: [PATCH 1/2] add ewe --- Modix.Bot/Modules/FunModule.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Modix.Bot/Modules/FunModule.cs b/Modix.Bot/Modules/FunModule.cs index 0fcfb98ea..90a2409e5 100644 --- a/Modix.Bot/Modules/FunModule.cs +++ b/Modix.Bot/Modules/FunModule.cs @@ -18,7 +18,7 @@ namespace Modix.Modules [HelpTags("jumbo")] public class FunModule : InteractionModuleBase { - private static readonly string[] _owoFaces = {"(・`ω´・)", ";;w;;", "owo", "UwU", ">w<", "^w^"}; + private static readonly string[] _owoFaces = { "(・`ω´・)", ";;w;;", "owo", "UwU", ">w<", "^w^" }; private const ushort MinimumAvatarSize = 16; private const ushort MaximumAvatarSize = 4096; @@ -148,6 +148,16 @@ public async Task OwoifyAsync([Summary(description: "The message to owoify.")] s await FollowupAsync(owoMessage, allowedMentions: AllowedMentions.None); } + [SlashCommand("ewe", "Eweifies the given message.")] + public async Task EweifyAsync([Summary(description: "The message to owoify.")] string message) + { + var eweMessage = message; + + eweMessage = Regex.Replace(eweMessage, "[aeiouyAEIOUY]", "E"); + + await FollowupAsync(eweMessage, allowedMentions: AllowedMentions.None); + } + protected IHttpClientFactory HttpClientFactory { get; } } } From d0e4a97a70e34b69bdeed39a636c19594f1b2838 Mon Sep 17 00:00:00 2001 From: TeBeCo Date: Thu, 23 Nov 2023 22:00:32 +0400 Subject: [PATCH 2/2] Better --- Modix.Bot/Modules/FunModule.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modix.Bot/Modules/FunModule.cs b/Modix.Bot/Modules/FunModule.cs index 90a2409e5..90d4420e5 100644 --- a/Modix.Bot/Modules/FunModule.cs +++ b/Modix.Bot/Modules/FunModule.cs @@ -152,8 +152,7 @@ public async Task OwoifyAsync([Summary(description: "The message to owoify.")] s public async Task EweifyAsync([Summary(description: "The message to owoify.")] string message) { var eweMessage = message; - - eweMessage = Regex.Replace(eweMessage, "[aeiouyAEIOUY]", "E"); + eweMessage = Regex.Replace(eweMessage, "[aeiouy]", "E", RegexOptions.IgnoreCase); await FollowupAsync(eweMessage, allowedMentions: AllowedMentions.None); }