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
|
# TODO implement new jokes
|
||||||
# - j'accuse
|
|
||||||
# - egos
|
# - egos
|
||||||
# - money is no option
|
# - money is no option
|
||||||
# - we're young, hot, and rich
|
# - we're young, hot, and rich
|
||||||
@@ -38,7 +37,7 @@ class CumJoke(base.Joke):
|
|||||||
'cumming',
|
'cumming',
|
||||||
'cummed'
|
'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):
|
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||||
if not match.group(0).startswith('be'):
|
if not match.group(0).startswith('be'):
|
||||||
@@ -118,7 +117,7 @@ class NotLikeThisJoke(base.GifJoke):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def regex(self) -> re.Pattern:
|
def regex(self) -> re.Pattern:
|
||||||
return re.compile('like this', re.IGNORECASE)
|
return re.compile('not like this', re.IGNORECASE)
|
||||||
|
|
||||||
|
|
||||||
class ChiliJoke(base.GifJoke):
|
class ChiliJoke(base.GifJoke):
|
||||||
@@ -168,6 +167,7 @@ class BigFan(base.GifJoke):
|
|||||||
def regex(self) -> re.Pattern:
|
def regex(self) -> re.Pattern:
|
||||||
return re.compile('big fan', re.IGNORECASE)
|
return re.compile('big fan', re.IGNORECASE)
|
||||||
|
|
||||||
|
|
||||||
class Blackface(base.Joke):
|
class Blackface(base.Joke):
|
||||||
@property
|
@property
|
||||||
def regex(self) -> re.Pattern:
|
def regex(self) -> re.Pattern:
|
||||||
|
|||||||
Reference in New Issue
Block a user