Spaces:
Running
Running
File size: 770 Bytes
041529f 155c78b 8772d56 155c78b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# Copyright (C) 2019-2025 TeamKillerX <https://github.com/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 |