RoboZhando/Synthesizer.cs
/// <summary>Creates the clean content for the given message</summary>
Creates the clean content for the given message
Creates the clean content for the given message
protected Task<string> CreateCleanMessage(DiscordMessage message)
        {
            string text = message.Content;
            text = tagger.Tag(text);
            text = Regex.Replace(text, @"(http[s]?:\/\/(www\.)?|ftp:\/\/(www\.)?|www\.){1}([0-9A-Za-z-\.@:%_\+~#=]+)+((\.[a-zA-Z]{2,3})+)(\/([^\s])*)?(\?(.)*)?", "");
            text = Regex.Replace(text, @"`.*`", "");
            text = text.Replace("\"://", "\"https://");
            return Task.FromResult(text.Trim());
        }
protected Task < string > CreateCleanMessage ( DiscordMessage message ) { string text = message . Content ; text = tagger . Tag ( text ) ; text = Regex . Replace ( text , @"(http[s]?:\/\/(www\.)?|ftp:\/\/(www\.)?|www\.){1}([0-9A-Za-z-\.@:%_\+~#=]+)+((\.[a-zA-Z]{2,3})+)(\/([^\s])*)?(\?(.)*)?" , " " ) ; text = Regex . Replace ( text , @"`.*`" , " " ) ; text = text . Replace ( " \" " , " \" " ) ; return Task . FromResult ( text . Trim ( ) ) ; }
Creates the clean content for the given message
Creates the clean content for the given message
// Do tags // Remove links // Remove code blocks // Replace the missing http
message
DiscordMessage