From c6bf309f1debb2946af63f98f00a983282276f98 Mon Sep 17 00:00:00 2001 From: "kevin.caires" Date: Wed, 17 Aug 2022 18:44:41 -0300 Subject: [PATCH] ADD image link validation. --- utils/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/commands.py b/utils/commands.py index ba1e384..788764e 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -23,11 +23,15 @@ async def quote(bot: object, *quote: str) -> str: quote = ' '.join(quote) + if 'http' in quote and 'discord' in quote and not quote[-4:] == '.png': + return await bot.send("- _Don't fuck, dumb ass!_\n"\ + "- _Hey put a valid image link, bitch!_\n- _Are you an idiot? You mother fucker!_") + try: user = bot.author.name set_quote(user, quote) except Exception as ex: - return await bot.send(ex.args) + return await bot.send(f'{ex.args}\n_What that fuck you doing?_') else: return await bot.send('Done:\n`%s`' % quote)