Add the gay meter
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
This commit is contained in:
parent
3b9dda7706
commit
421fece6be
1 changed files with 44 additions and 0 deletions
44
src/cogs/gay_meter.py
Normal file
44
src/cogs/gay_meter.py
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import asyncio
|
||||||
|
import random
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import discord
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
|
|
||||||
|
class MeterCog(commands.Cog):
|
||||||
|
def __init__(self, bot: commands.Bot):
|
||||||
|
self.bot = bot
|
||||||
|
self.log = logging.getLogger("jimmy.cogs.auto_responder")
|
||||||
|
self.cache = {}
|
||||||
|
|
||||||
|
@commands.slash_command(name="gay-meter")
|
||||||
|
async def gay_meter(self, ctx: discord.ApplicationContext, user: discord.User = None):
|
||||||
|
"""Checks how gay someone is"""
|
||||||
|
user = user or ctx.user
|
||||||
|
|
||||||
|
for i in range(0, 125, 25):
|
||||||
|
await ctx.respond("Calculating... %d%%" % i)
|
||||||
|
await asyncio.sleep(random.randint(1, 30) / 10)
|
||||||
|
|
||||||
|
pct = user.id % 100
|
||||||
|
await ctx.respond(f"{user.mention} is {pct}% gay.")
|
||||||
|
|
||||||
|
@commands.slash_command(name="penis-length")
|
||||||
|
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)
|
||||||
|
chunks = ["8"]
|
||||||
|
chunks += ["="] * n
|
||||||
|
chunks.append("B")
|
||||||
|
return await ctx.respond(
|
||||||
|
embed=discord.Embed(
|
||||||
|
title=f"{user.mention}'s penis length:",
|
||||||
|
description="%d cm\n%s" % (n, "".join(chunks))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def setup(bot):
|
||||||
|
bot.add_cog(MeterCog(bot))
|
Loading…
Reference in a new issue