butthole protection

This commit is contained in:
jsl12
2022-05-11 23:32:21 -05:00
parent 13660bcdc0
commit bd38d3e0e9

View File

@@ -84,8 +84,14 @@ class Kwaylon(Client):
async with message.channel.typing(): async with message.channel.typing():
with self.data.connect() as con: with self.data.connect() as con:
days = get_days(message.content) or 14 days = get_days(message.content) or 14
df = self.data.read_emoji(emoji_name, con=con,
after=(datetime.today() - timedelta(days=days)).astimezone()) if days >= 1000:
await message.reply(
f'https://tenor.com/view/i-hate-you-anakin-darth-vader-vader-star-wars-gif-13071041')
return
now = datetime.today().astimezone()
df = self.data.read_emoji(emoji_name, con=con, after=(now - timedelta(days=days)))
con.close() con.close()
if df.shape[0] > 0: if df.shape[0] > 0: