From 0c6a010a070e887df024d5250751c9011ddb55d7 Mon Sep 17 00:00:00 2001 From: nex Date: Wed, 29 Nov 2023 10:16:22 +0000 Subject: [PATCH] Add the option to pick a proxy --- cogs/other.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cogs/other.py b/cogs/other.py index 7b84634..438f03e 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -2306,7 +2306,15 @@ class OtherCog(commands.Cog): async def test_proxy( self, ctx: discord.ApplicationContext, - run_speed_test: bool = False + run_speed_test: bool = False, + proxy_name: discord.Option( + str, + choices=[ + "SHRoNK", + "NexBox", + "first-working" + ] + ) = "first-working" ): """Tests proxies.""" await ctx.defer() @@ -2332,6 +2340,12 @@ class OtherCog(commands.Cog): "tested": False } } + if proxy_name != "first-working": + for key, value in results.items(): + if value["name"].lower() == proxy_name.lower(): + continue + else: + results.pop(key) embed = discord.Embed( title="\N{white heavy check mark} Proxy available." )