From c1775f767dd69b6725e9e32acab7fbd5df64ebc5 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sun, 11 Jul 2021 11:53:19 -0700 Subject: [PATCH] let someone know if they need to provide a link to an image --- app/bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/bot.py b/app/bot.py index 3ceabf1b..bbe4a180 100755 --- a/app/bot.py +++ b/app/bot.py @@ -298,6 +298,8 @@ async def roles(ctx): @bot.command(name='simp') async def simp(ctx): + if len(ctx.message.content.split()) == 1: + return await ctx.send('You must provide a link to an image') response = requests.get("https://some-random-api.ml/canvas/simpcard/?avatar=%s" % ctx.message.content.split()[-1]) with open('/app/simp.jpg', 'wb') as f: f.write(response.content) @@ -306,6 +308,8 @@ async def simp(ctx): @bot.command(name='horny') async def horny(ctx): + if len(ctx.message.content.split()) == 1: + return await ctx.send('You must provide a link to an image') response = requests.get("https://some-random-api.ml/canvas/horny/?avatar=%s" % ctx.message.content.split()[-1]) with open('/app/horny.jpg', 'wb') as f: f.write(response.content) @@ -314,6 +318,8 @@ async def horny(ctx): @bot.command(name='wasted') async def wasted(ctx): + if len(ctx.message.content.split()) == 1: + return await ctx.send('You must provide a link to an image') response = requests.get("https://some-random-api.ml/canvas/wasted/?avatar=%s" % ctx.message.content.split()[-1]) with open('/app/wasted.jpg', 'wb') as f: f.write(response.content)