From 53cec40d89f85d3f28dd43817d9078b717d45a2a Mon Sep 17 00:00:00 2001 From: jsl12 <32917998+jsl12@users.noreply.github.com> Date: Fri, 21 Jan 2022 17:33:41 -0600 Subject: [PATCH] joke update --- kwaylon/jokes/base.py | 2 +- kwaylon/jokes/jokes.py | 10 ++-------- kwaylon/kwaylon.py | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/kwaylon/jokes/base.py b/kwaylon/jokes/base.py index d85a339..2cf5319 100644 --- a/kwaylon/jokes/base.py +++ b/kwaylon/jokes/base.py @@ -19,4 +19,4 @@ class GifJoke(Joke): url: str async def respond(self, message: discord.Message, client: discord.Client, match: re.Match): - await message.channel.send(self.url) + await message.reply(self.url) diff --git a/kwaylon/jokes/jokes.py b/kwaylon/jokes/jokes.py index 13c65d5..1f59451 100644 --- a/kwaylon/jokes/jokes.py +++ b/kwaylon/jokes/jokes.py @@ -87,7 +87,7 @@ class BeansJoke(base.GifJoke): async def respond(self, message: discord.Message, client: discord.Client, match: re.Match): await message.reply('Somebody help! I\'ve got beans in my motherboard!\n') - await super().respond(message, client, match) + await message.channel.send(self.url) class NotLikeThisJoke(base.GifJoke): @@ -95,10 +95,7 @@ class NotLikeThisJoke(base.GifJoke): @property def regex(self) -> re.Pattern: - return re.compile('not like this', re.IGNORECASE) - - async def respond(self, message: discord.Message, client: discord.Client, match: re.Match): - await message.reply(self.url) + return re.compile('like this', re.IGNORECASE) class ChiliJoke(base.GifJoke): @@ -107,6 +104,3 @@ class ChiliJoke(base.GifJoke): @property def regex(self) -> re.Pattern: return re.compile('chil(i|ly)', re.IGNORECASE) - - async def respond(self, message: discord.Message, client: discord.Client, match: re.Match): - await message.reply(self.url) diff --git a/kwaylon/kwaylon.py b/kwaylon/kwaylon.py index 8f2f99c..6cca1a0 100644 --- a/kwaylon/kwaylon.py +++ b/kwaylon/kwaylon.py @@ -36,7 +36,7 @@ class Kwaylon(discord.Client): await channel.send('https://tenor.com/view/terminator-im-back-gif-19144173') await channel.send(f"{discord.utils.get(self.emojis, name='kaylon')}") - await alive() + # await alive() # self.data: data.MsgData = await data.MsgData.create(client=self, limit=self.limit, days=self.days) # self.data.to_sql(self.db_path)