Alter the penis algorithm
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m7s
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m7s
This commit is contained in:
parent
ae968be9de
commit
0f631e003d
1 changed files with 18 additions and 6 deletions
|
@ -13,6 +13,7 @@ class MeterCog(commands.Cog):
|
|||
self.cache = {}
|
||||
|
||||
@commands.slash_command(name="gay-meter")
|
||||
@discord.guild_only()
|
||||
async def gay_meter(self, ctx: discord.ApplicationContext, user: discord.User = None):
|
||||
"""Checks how gay someone is"""
|
||||
user = user or ctx.user
|
||||
|
@ -22,6 +23,9 @@ class MeterCog(commands.Cog):
|
|||
await ctx.edit(content="Calculating... %d%%" % i)
|
||||
await asyncio.sleep(random.randint(1, 30) / 10)
|
||||
|
||||
if random.randint(0, 1):
|
||||
pct = sum((user.id, ctx.user.id, ctx.channel.id, ctx.guild.id)) % 400
|
||||
else:
|
||||
pct = user.id % 100
|
||||
await ctx.edit(content=f"{user.mention} is {pct}% gay.")
|
||||
|
||||
|
@ -29,15 +33,23 @@ class MeterCog(commands.Cog):
|
|||
async def penis_meter(self, ctx: discord.ApplicationContext, user: discord.User = None):
|
||||
"""Checks the length of someone's penis."""
|
||||
user = user or ctx.user
|
||||
n = self.cache.get(user) or random.randint(0, 100)
|
||||
if random.randint(0, 1):
|
||||
pct = sum((user.id, ctx.user.id)) % 200
|
||||
else:
|
||||
pct = user.id % 125
|
||||
pct = pct
|
||||
chunks = ["8"]
|
||||
chunks += ["="] * n
|
||||
chunks += ["="] * pct
|
||||
chunks.append("B")
|
||||
self.cache[user] = n
|
||||
inch = pct * 0.3937008
|
||||
im = "inch"
|
||||
if pct > 30.48:
|
||||
im = "ft"
|
||||
inch = pct * 0.0328084
|
||||
return await ctx.respond(
|
||||
embed=discord.Embed(
|
||||
title=f"{user.display_name}'s penis length:",
|
||||
description="%d cm\n%s" % (n, "".join(chunks))
|
||||
description="%d cm (%.2f%s)\n%s" % (pct, inch, im, "".join(chunks))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue