slight change to CumJoke regex \w to \S

This commit is contained in:
jsl12
2022-05-19 21:36:50 -05:00
parent 62f38bd07c
commit 5cd8158221

View File

@@ -11,7 +11,6 @@ LOGGER = logging.getLogger(__name__)
# TODO implement new jokes
# - j'accuse
# - egos
# - money is no option
# - we're young, hot, and rich
@@ -38,7 +37,7 @@ class CumJoke(base.Joke):
'cumming',
'cummed'
]
return re.compile(f"(?<!\w)({'|'.join(words)})(?!\w)", re.IGNORECASE)
return re.compile(f"(?<!\S)({'|'.join(words)})(?!\S)", re.IGNORECASE)
async def respond(self, message: Message, client: Client, match: re.Match):
if not match.group(0).startswith('be'):
@@ -118,7 +117,7 @@ class NotLikeThisJoke(base.GifJoke):
@property
def regex(self) -> re.Pattern:
return re.compile('like this', re.IGNORECASE)
return re.compile('not like this', re.IGNORECASE)
class ChiliJoke(base.GifJoke):
@@ -168,7 +167,8 @@ class BigFan(base.GifJoke):
def regex(self) -> re.Pattern:
return re.compile('big fan', re.IGNORECASE)
class Blackface(base.Joke):
class Blackface(base.Joke):
@property
def regex(self) -> re.Pattern:
return re.compile('blackface', re.IGNORECASE)