From e4648abd371030641764eb19f6d26271ebce2871 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Tue, 5 Dec 2017 22:18:08 -0300 Subject: [PATCH] sex: check account type in reason --- bot/ext/sex.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bot/ext/sex.py b/bot/ext/sex.py index 1a217b6..3ab9e61 100644 --- a/bot/ext/sex.py +++ b/bot/ext/sex.py @@ -40,18 +40,21 @@ class Sex(Cog): if not reason: return await ctx.send('Please provde a reason') + if 'lite' not in reason.lower() or 'sexhouse' not in reason.lower(): + return await ctx.send('At least provide an account type.') + em = discord.Embed(title=f'Sexhouse request', color=discord.Colour(0xf84a6e)) em.add_field(name='Who', value=ctx.author.mention) em.add_field(name='Username', value=username) em.add_field(name='Reason', value=reason) - #I have no idea why this didn't work because according to docs it should. pls fic thank. - #em.add_field(name='Timestamp', str(ctx.message.timestamp)) + em.add_field(name='Generated Password', value=base64.b64encode(os.urandom(100))[:16].decode()) + await chan.send(embed=em) - await ctx.send('done') + await ctx.send('done!') def setup(bot):