sex: check account type in reason

This commit is contained in:
Luna Mendes 2017-12-05 22:18:08 -03:00
parent e017ff8b83
commit e4648abd37

View file

@ -40,18 +40,21 @@ class Sex(Cog):
if not reason: if not reason:
return await ctx.send('Please provde a 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', em = discord.Embed(title=f'Sexhouse request',
color=discord.Colour(0xf84a6e)) color=discord.Colour(0xf84a6e))
em.add_field(name='Who', value=ctx.author.mention) em.add_field(name='Who', value=ctx.author.mention)
em.add_field(name='Username', value=username) em.add_field(name='Username', value=username)
em.add_field(name='Reason', value=reason) 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', em.add_field(name='Generated Password',
value=base64.b64encode(os.urandom(100))[:16].decode()) value=base64.b64encode(os.urandom(100))[:16].decode())
await chan.send(embed=em) await chan.send(embed=em)
await ctx.send('done') await ctx.send('done!')
def setup(bot): def setup(bot):