public static string Censor(this string s, WordGuardControl control) { if (control == WordGuardControl.Inactive) { return(s); } if (control == WordGuardControl.Careful) { return(s.MarkdownSpoiler()); } if (control == WordGuardControl.Controlled) { return(s[0] + s.Censor().Substring(1)); } return(s.Censor()); }
public void SetWordGuard(WordGuardControl ctrl) => WordGuardHandling = ctrl;