C#C
C#3y ago
15 replies
Jin

String Contain issue

So im trying to get a word in a string using Contain but its not getting the word, I havent found a workaround it or im just completely doing it wrong.
if (OtherUser != null)
            {
                string bio = OtherUser.Bio.Replace("\n","").Replace(" ","").Trim();
                if (bio.Contains("OwlHouse#disc"))
                {
                    await RespondAsync($"{Context.User.Mention} You have been verified.",ephemeral: true);
                }
                else
                {
                    await RespondAsync($"{Context.User.Mention} You do not have the code in your Bio. \n`[ BIO ]` \n{bio}", ephemeral: true);
                }
            }
image.png
Was this page helpful?