mirror of https://gitlab.com/bashrc2/epicyon
Lower case for checking don't reply
parent
65496b5a75
commit
2c8a1788cd
13
utils.py
13
utils.py
|
@ -3805,11 +3805,12 @@ def disallow_announce(content: str) -> bool:
|
||||||
"don't boost",
|
"don't boost",
|
||||||
'boost_denied',
|
'boost_denied',
|
||||||
'boosts_denied',
|
'boosts_denied',
|
||||||
'BoostDenied',
|
'boostdenied',
|
||||||
'BoostsDenied'
|
'boostsdenied'
|
||||||
)
|
)
|
||||||
|
content_lower = content.lower()
|
||||||
for diss in disallow_strings:
|
for diss in disallow_strings:
|
||||||
if diss in content:
|
if diss in content_lower:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -3828,10 +3829,12 @@ def disallow_reply(content: str) -> bool:
|
||||||
'do not reply',
|
'do not reply',
|
||||||
"don't reply",
|
"don't reply",
|
||||||
"don't @ me",
|
"don't @ me",
|
||||||
'DontAtMe'
|
'dont@me',
|
||||||
|
'dontatme'
|
||||||
)
|
)
|
||||||
|
content_lower = content.lower()
|
||||||
for diss in disallow_strings:
|
for diss in disallow_strings:
|
||||||
if diss in content:
|
if diss in content_lower:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue