slight change to CumJoke regex \w to \S
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user