# Copyright (C) 2019-2025 TeamKillerX # # This file is part of TeamKillerX project, # and licensed under GNU Affero General Public License v3. # See the GNU Affero General Public License for more details. # # All rights reserved. See COPYING, AUTHORS. # credits xtdevs import re def is_blocked_font_stylish(message): STYLISH_FONT_REGEX = r"[^\u0000-\u007F\u00A0-\u00FF\u0100-\u017F]+" if re.search(STYLISH_FONT_REGEX, message): return True else: return False def is_blocked_markdown_code(message): pattern = r"(?:python|py|javascript|js|bash|sh|html|go|cpp|c|json)\n.*?" match = re.search(pattern, message, re.DOTALL | re.IGNORECASE) if match: return True else: return False