From 015f049b879d4f180647cb7c73fb7cc50ceb35e1 Mon Sep 17 00:00:00 2001 From: portalBlock Date: Sun, 2 Mar 2025 21:10:32 -0600 Subject: [PATCH 1/6] Resolves #313. --- penis/penis.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/penis/penis.py b/penis/penis.py index b7796ec8..745d45e2 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -3,10 +3,13 @@ import discord from redbot.core import commands from redbot.core.utils.chat_formatting import pagify +from redbot.core.utils.mod import is_mod_or_superior DONG_DISTRIBUTION_CONST = 30 SMALL_DONG_CONST = 6 BIG_DONG_CONST = DONG_DISTRIBUTION_CONST - SMALL_DONG_CONST +VIP_DONG_CONST = DONG_DISTRIBUTION_CONST + 5 + class Penis(commands.Cog): """Penis related commands.""" @@ -30,7 +33,8 @@ async def penis(self, ctx, *users: discord.Member): for user in users: random.seed(user.id) - dongs[user] = "8{}D".format("=" * random.randint(0, DONG_DISTRIBUTION_CONST)) + dongs[user] = ("8{}D".format("=" * random.randint(0, DONG_DISTRIBUTION_CONST)), + VIP_DONG_CONST)[await is_mod_or_superior(ctx.bot, user)] random.setstate(state) dongs = sorted(dongs.items(), key=lambda x: x[1]) @@ -41,7 +45,11 @@ async def penis(self, ctx, *users: discord.Member): elif len(dong) <= BIG_DONG_CONST: msg += "**{}'s size:**\n{}\n".format(user.display_name, dong) else: - msg += "**{}'s size:**\n{}\nwow, now that's a dong!\n".format(user.display_name, dong) + if len(dong) == VIP_DONG_CONST: + msg += "**{}'s size:**\n{}\nYou thought you could dick measure your way out of this one?\n"\ + .format(user.display_name, dong) + else: + msg += "**{}'s size:**\n{}\nwow, now that's a dong!\n".format(user.display_name, dong) for page in pagify(msg): await ctx.send(page) From f3e2c03f1d54de725901e1a0c191c9fb7bfe00c1 Mon Sep 17 00:00:00 2001 From: portalBlock Date: Sun, 2 Mar 2025 21:14:44 -0600 Subject: [PATCH 2/6] Resolves #313 (for real) --- penis/penis.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/penis/penis.py b/penis/penis.py index 745d45e2..e1246b20 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -33,8 +33,7 @@ async def penis(self, ctx, *users: discord.Member): for user in users: random.seed(user.id) - dongs[user] = ("8{}D".format("=" * random.randint(0, DONG_DISTRIBUTION_CONST)), - VIP_DONG_CONST)[await is_mod_or_superior(ctx.bot, user)] + dongs[user] = "8{}D".format("=" * (random.randint(0, DONG_DISTRIBUTION_CONST), VIP_DONG_CONST)[await is_mod_or_superior(ctx.bot, user)]) random.setstate(state) dongs = sorted(dongs.items(), key=lambda x: x[1]) From 77d0f95b4d3b7c2aaf8b4c40ed8b7b729d83e67d Mon Sep 17 00:00:00 2001 From: portalBlock Date: Sun, 2 Mar 2025 21:16:20 -0600 Subject: [PATCH 3/6] Resolves #313 (for real) --- penis/penis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/penis/penis.py b/penis/penis.py index e1246b20..85808945 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -44,7 +44,7 @@ async def penis(self, ctx, *users: discord.Member): elif len(dong) <= BIG_DONG_CONST: msg += "**{}'s size:**\n{}\n".format(user.display_name, dong) else: - if len(dong) == VIP_DONG_CONST: + if len(dong) >= VIP_DONG_CONST: msg += "**{}'s size:**\n{}\nYou thought you could dick measure your way out of this one?\n"\ .format(user.display_name, dong) else: From 75f3110ab9dc7fdd047837616e8d6b24c3ba1e94 Mon Sep 17 00:00:00 2001 From: portalBlock Date: Sun, 2 Mar 2025 21:25:57 -0600 Subject: [PATCH 4/6] Appease the linter --- penis/penis.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/penis/penis.py b/penis/penis.py index 85808945..c084e656 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -43,12 +43,11 @@ async def penis(self, ctx, *users: discord.Member): msg += "**{}'s size:**\n{}\nlol small\n".format(user.display_name, dong) elif len(dong) <= BIG_DONG_CONST: msg += "**{}'s size:**\n{}\n".format(user.display_name, dong) + elif len(dong) >= VIP_DONG_CONST: + msg += "**{}'s size:**\n{}\nYou thought you could dick measure your way out of this one?\n"\ + .format(user.display_name, dong) else: - if len(dong) >= VIP_DONG_CONST: - msg += "**{}'s size:**\n{}\nYou thought you could dick measure your way out of this one?\n"\ - .format(user.display_name, dong) - else: - msg += "**{}'s size:**\n{}\nwow, now that's a dong!\n".format(user.display_name, dong) + msg += "**{}'s size:**\n{}\nwow, now that's a dong!\n".format(user.display_name, dong) for page in pagify(msg): await ctx.send(page) From a40fef9a30e0675bd69acdff5e85c4447102292a Mon Sep 17 00:00:00 2001 From: Alfred <68240493+Alfredooe@users.noreply.github.com> Date: Mon, 3 Mar 2025 19:38:26 +0000 Subject: [PATCH 5/6] PNS-426: Implement SPECIAL_USER_IDS handling. --- penis/penis.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/penis/penis.py b/penis/penis.py index c084e656..96aa72ed 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -9,6 +9,8 @@ SMALL_DONG_CONST = 6 BIG_DONG_CONST = DONG_DISTRIBUTION_CONST - SMALL_DONG_CONST VIP_DONG_CONST = DONG_DISTRIBUTION_CONST + 5 +SPECIAL_DONG_CONST = 100 +SPECIAL_USER_IDS = [223453942003138562] class Penis(commands.Cog): @@ -33,7 +35,12 @@ async def penis(self, ctx, *users: discord.Member): for user in users: random.seed(user.id) - dongs[user] = "8{}D".format("=" * (random.randint(0, DONG_DISTRIBUTION_CONST), VIP_DONG_CONST)[await is_mod_or_superior(ctx.bot, user)]) + if user.id in SPECIAL_USER_IDS: + dongs[user] = "8{}D".format("=" * SPECIAL_DONG_CONST) + else: + is_vip = await is_mod_or_superior(ctx.bot, user) + length = VIP_DONG_CONST if is_vip else random.randint(0, DONG_DISTRIBUTION_CONST) + dongs[user] = "8{}D".format("=" * length) random.setstate(state) dongs = sorted(dongs.items(), key=lambda x: x[1]) From e3ac19e812e8d2ab9fe96cee0e71ff1cd5f2e3d7 Mon Sep 17 00:00:00 2001 From: ripple Date: Tue, 4 Mar 2025 15:38:39 +0000 Subject: [PATCH 6/6] Revert "PNS-426: Implement SPECIAL_USER_IDS handling." This reverts commit a40fef9a30e0675bd69acdff5e85c4447102292a. --- penis/penis.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/penis/penis.py b/penis/penis.py index 96aa72ed..c084e656 100644 --- a/penis/penis.py +++ b/penis/penis.py @@ -9,8 +9,6 @@ SMALL_DONG_CONST = 6 BIG_DONG_CONST = DONG_DISTRIBUTION_CONST - SMALL_DONG_CONST VIP_DONG_CONST = DONG_DISTRIBUTION_CONST + 5 -SPECIAL_DONG_CONST = 100 -SPECIAL_USER_IDS = [223453942003138562] class Penis(commands.Cog): @@ -35,12 +33,7 @@ async def penis(self, ctx, *users: discord.Member): for user in users: random.seed(user.id) - if user.id in SPECIAL_USER_IDS: - dongs[user] = "8{}D".format("=" * SPECIAL_DONG_CONST) - else: - is_vip = await is_mod_or_superior(ctx.bot, user) - length = VIP_DONG_CONST if is_vip else random.randint(0, DONG_DISTRIBUTION_CONST) - dongs[user] = "8{}D".format("=" * length) + dongs[user] = "8{}D".format("=" * (random.randint(0, DONG_DISTRIBUTION_CONST), VIP_DONG_CONST)[await is_mod_or_superior(ctx.bot, user)]) random.setstate(state) dongs = sorted(dongs.items(), key=lambda x: x[1])