anti-eval-bot / helper_regex.py
randydev's picture
Update helper_regex.py
041529f verified
raw
history blame
561 Bytes
# 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_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