added some GifJokes
This commit is contained in:
22
jokes.py
22
jokes.py
@@ -75,33 +75,39 @@ class DominosJoke(Joke):
|
||||
class GifJoke(Joke):
|
||||
url: str
|
||||
|
||||
def __init__(self, url: str):
|
||||
self.url = url
|
||||
|
||||
async def respond(self, message: discord.Message, client: discord.Client, scan_res):
|
||||
await message.channel.send(self.url)
|
||||
|
||||
|
||||
class BeansJoke(GifJoke):
|
||||
url = 'https://c.tenor.com/TjX1yORoln0AAAAM/this-is-beans-beans.gif'
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('beans', re.IGNORECASE)
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(url='https://c.tenor.com/TjX1yORoln0AAAAM/this-is-beans-beans.gif')
|
||||
|
||||
async def respond(self, message: discord.Message, client: discord.Client, scan_res):
|
||||
await message.reply('Somebody help! I\'ve got beans in my motherboard!\n')
|
||||
await super().respond(message, client, scan_res)
|
||||
|
||||
|
||||
class NotLikeThisJoke(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('not like this', re.IGNORECASE)
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(url='https://tenor.com/view/not-like-this-the-matrix-panic-neo-angry-gif-5216157')
|
||||
async def respond(self, message: discord.Message, client: discord.Client, scan_res):
|
||||
await message.reply(self.url)
|
||||
|
||||
|
||||
class ChiliJoke(GifJoke):
|
||||
url = 'https://tenor.com/view/office-gif-20038284'
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('chil(i|ly)')
|
||||
|
||||
async def respond(self, message: discord.Message, client: discord.Client, scan_res):
|
||||
await message.reply(self.url)
|
||||
|
||||
Reference in New Issue
Block a user