Adjust gay time
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
This commit is contained in:
parent
7a5da08a6e
commit
889e43398e
1 changed files with 13 additions and 2 deletions
|
@ -20,7 +20,7 @@ class MeterCog(commands.Cog):
|
|||
await ctx.respond("Calculating...")
|
||||
for i in range(0, 125, 25):
|
||||
await ctx.edit(content="Calculating... %d%%" % i)
|
||||
await asyncio.sleep(random.randint(1, 30) / 10)
|
||||
await asyncio.sleep(random.randint(1, 100) / 10)
|
||||
|
||||
pct = user.id % 100
|
||||
await ctx.edit(content=f"{user.mention} is {pct}% gay.")
|
||||
|
@ -29,10 +29,11 @@ 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 = random.randint(0, 100)
|
||||
n = self.cache.get(user) or random.randint(0, 100)
|
||||
chunks = ["8"]
|
||||
chunks += ["="] * n
|
||||
chunks.append("B")
|
||||
self.cache[user] = n
|
||||
return await ctx.respond(
|
||||
embed=discord.Embed(
|
||||
title=f"{user.display_name}'s penis length:",
|
||||
|
@ -40,6 +41,16 @@ class MeterCog(commands.Cog):
|
|||
)
|
||||
)
|
||||
|
||||
@commands.command()
|
||||
@commands.is_owner()
|
||||
async def clear_cache(self, ctx: commands.Context, user: discord.User = None):
|
||||
"""Clears the Meter cache"""
|
||||
if not user:
|
||||
self.cache = {}
|
||||
else:
|
||||
self.cache.pop(user, None)
|
||||
return await ctx.message.add_reaction("\N{white heavy check mark}")
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(MeterCog(bot))
|
||||
|
|
Loading…
Reference in a new issue