public void OwoifyWithUvu() { Assert.DoesNotThrow(() => Owoifier.Owoify(Source, Owoifier.OwoifyLevel.Uvu)); var text = Owoifier.Owoify(Source, Owoifier.OwoifyLevel.Uvu); Assert.IsNotNull(text); Assert.IsNotEmpty(text); }
public void OwoifyWithOwo() { Assert.DoesNotThrow(() => Owoifier.Owoify(Source)); var text = Owoifier.Owoify(Source); Assert.IsNotNull(text); Assert.IsNotEmpty(text); }
public async Task Owoify(CommandContext ctx, [RemainingText] string input) { await ctx.RespondAsync(embed : new DiscordEmbedBuilder { Description = Owoifier.Owoify(input, Owoifier.OwoifyLevel.Uwu).Replace("`", "\\`").Replace("*", "\\*") .Replace("_", "\\_"), Color = DiscordColor.HotPink }.Build()); await ctx.Message.DeleteAsync(); }
private static string ParseOptionsAndEdit(string message) { Owoifier.OwoifyLevel?owoLevel = null; if (message.Contains(OwOIndicator)) { owoLevel = Owoifier.OwoifyLevel.Owo; message = message.Replace(OwOIndicator, string.Empty); } if (message.Contains(UwUIndicator)) { owoLevel = Owoifier.OwoifyLevel.Uwu; message = message.Replace(UwUIndicator, string.Empty); } if (message.Contains(UvUIndicator)) { owoLevel = Owoifier.OwoifyLevel.Uvu; message = message.Replace(UvUIndicator, string.Empty); } bool sarcasmify; if (sarcasmify = message.Contains(SarcasmifyIndicator)) { message = message.Replace(SarcasmifyIndicator, string.Empty); } bool clappify; if (clappify = message.Contains(ClappifyIndicator)) { message = message.Replace(ClappifyIndicator, string.Empty); } message = message.Trim(); if (owoLevel.HasValue) { message = Owoifier.Owoify(message, (Owoifier.OwoifyLevel)owoLevel); } if (sarcasmify) { message = Sarcasmify(message); } if (clappify) { message = Clappify(message); } return(message); }
public void OwoifyLongText() { Assert.DoesNotThrow(() => Owoifier.Owoify(_warAndPeaceText)); Assert.DoesNotThrow(() => Owoifier.Owoify(_warAndPeaceText, Owoifier.OwoifyLevel.Uwu)); Assert.DoesNotThrow(() => Owoifier.Owoify(_warAndPeaceText, Owoifier.OwoifyLevel.Uvu)); var owoifiedTextWithOwo = Owoifier.Owoify(_warAndPeaceText); var owoifiedTextWithUwu = Owoifier.Owoify(_warAndPeaceText, Owoifier.OwoifyLevel.Uwu); var owoifiedTextWithUvu = Owoifier.Owoify(_warAndPeaceText, Owoifier.OwoifyLevel.Uvu); Assert.IsNotNull(owoifiedTextWithOwo); Assert.IsNotNull(owoifiedTextWithUwu); Assert.IsNotNull(owoifiedTextWithUvu); Assert.IsNotEmpty(owoifiedTextWithOwo); Assert.IsNotEmpty(owoifiedTextWithUwu); Assert.IsNotEmpty(owoifiedTextWithUvu); }
public async Task OwoifyAsync(string intensity, params string[] text) { var responseText = Helper .GetLocalization(Helper.GetMemberConfig(Context.User.Id)?.Language); var owoifyCmd = responseText.texts.owoify; var level = intensity.ToLower().Trim() switch { "medium" => Owoifier.OwoifyLevel.Uwu, "hard" => Owoifier.OwoifyLevel.Uvu, _ => Owoifier.OwoifyLevel.Owo, }; if (text.Length > 1000) { await HandleErrorAsync(OwoifyError.LengthTooLong); return; } var msg = new List <string>(); if (!_intensities.Contains(intensity.ToLower().Trim())) { msg.Add(intensity); } foreach (var t in text) { if (_emoteIdRegex.IsMatch(t)) { msg.Add(t); } else { msg.Add(Owoifier.Owoify(t, level)); } } var result = owoifyCmd["result"].ToString() .Replace("{author}", Context.User.Username) .Replace("{text}", string.Join(' ', msg) .Replace("`", "\\`") .Replace("*", "\\*")); await Context.Channel.SendMessageAsync(result); }
public void OwoifyPokemonNames() { _pokemonNameList.ForEach(name => { Assert.DoesNotThrow(() => Owoifier.Owoify(name)); Assert.DoesNotThrow(() => Owoifier.Owoify(name, Owoifier.OwoifyLevel.Uwu)); Assert.DoesNotThrow(() => Owoifier.Owoify(name, Owoifier.OwoifyLevel.Uvu)); var owoifiedNameWithOwo = Owoifier.Owoify(name); var owoifiedNameWithUwu = Owoifier.Owoify(name, Owoifier.OwoifyLevel.Uwu); var owoifiedNameWithUvu = Owoifier.Owoify(name, Owoifier.OwoifyLevel.Uvu); Assert.IsNotNull(owoifiedNameWithOwo); Assert.IsNotNull(owoifiedNameWithUwu); Assert.IsNotNull(owoifiedNameWithUvu); Assert.IsNotEmpty(owoifiedNameWithOwo); Assert.IsNotEmpty(owoifiedNameWithUwu); Assert.IsNotEmpty(owoifiedNameWithUvu); }); }
public void OwoifiedUwuIsNotEqualToUvu() { Assert.AreNotEqual(Owoifier.Owoify(Source, Owoifier.OwoifyLevel.Uwu), Owoifier.Owoify(Source, Owoifier.OwoifyLevel.Uvu)); }
public void Owoify() { Assert.AreNotEqual(Owoifier.Owoify(Source), Source); }