added dark chocolate joke
This commit is contained in:
119
src/kwaylon/jokes/jokes.py
Normal file
119
src/kwaylon/jokes/jokes.py
Normal file
@@ -0,0 +1,119 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from nextcord import Client, Message
|
||||
from nextcord import utils
|
||||
|
||||
from . import base, helpers
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# TODO implement new jokes
|
||||
# - j'accuse
|
||||
# - egos
|
||||
# - money is no option
|
||||
# - we're young, hot, and rich
|
||||
# - last name page when ordering
|
||||
# - mcnulty shot and beer
|
||||
# - white trash karate backflips
|
||||
# - buc-ees
|
||||
# - arbys
|
||||
# - grease 2
|
||||
# - Sweet Transvestite
|
||||
# - Hopkins County Stew Contest
|
||||
# - yesterday tacos
|
||||
# - strip club
|
||||
|
||||
|
||||
class CumJoke(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
words = [
|
||||
'come',
|
||||
'coming',
|
||||
'came',
|
||||
'cum',
|
||||
'cumming',
|
||||
'cummed'
|
||||
]
|
||||
return re.compile(f"(?<!\w)({'|'.join(words)})(?!\w)", re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
if not match.group(0).startswith('be'):
|
||||
await message.add_reaction(utils.get(client.emojis, name='kaylon'))
|
||||
|
||||
|
||||
class ChocolateJoke(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile(f'(?:dark )?chocolate', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
await message.add_reaction(utils.get(client.emojis, name='jake'))
|
||||
if 'dark' in match.group():
|
||||
await message.reply(
|
||||
f'https://tenor.com/view/j-alexander-antm-americas-next-top-model-clutches-pearls-clutch-neck-gif-21070072')
|
||||
|
||||
|
||||
class BlackJoke(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('black (\w+)', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
res = helpers.unblack(message.content)
|
||||
if res is not None:
|
||||
msg = await message.reply(res)
|
||||
await msg.add_reaction(utils.get(client.emojis, name='kaylon'))
|
||||
|
||||
|
||||
class AssJoke(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('[ \-]ass[ \-](?P<target>\w+)', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
res = helpers.assify(message.content)
|
||||
if res is not None:
|
||||
await message.reply(f'{res} {utils.get(client.emojis, name="kaylon")}')
|
||||
|
||||
|
||||
class DominosJoke(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('domino\'?s', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
cp = helpers.get_stock_price('DPZ')
|
||||
msg = f'You know, my friend Nick has made about ${cp - 16:.0f} on Domino\'s stock. He basically owns it now'
|
||||
await message.add_reaction('\U0001F355')
|
||||
await message.reply(msg)
|
||||
|
||||
|
||||
class BeansJoke(base.GifJoke):
|
||||
url = 'https://c.tenor.com/TjX1yORoln0AAAAM/this-is-beans-beans.gif'
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('beans', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
await message.reply('Somebody help! I\'ve got beans in my motherboard!\n')
|
||||
await message.channel.send(self.url)
|
||||
|
||||
|
||||
class NotLikeThisJoke(base.GifJoke):
|
||||
url = 'https://tenor.com/view/not-like-this-the-matrix-panic-neo-angry-gif-5216157'
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('like this', re.IGNORECASE)
|
||||
|
||||
|
||||
class ChiliJoke(base.GifJoke):
|
||||
url = 'https://tenor.com/view/office-gif-20038284'
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('chil(i|ly)', re.IGNORECASE)
|
||||
Reference in New Issue
Block a user