Non-http links <333

This commit is contained in:
nex 2023-01-16 09:59:37 +00:00
parent f404bc7445
commit 1bb9b43a20

View file

@ -433,11 +433,10 @@ class OtherCog(commands.Cog):
if ctx.user.id == 1019233057519177778:
if getattr(self.bot, "ALLOW_MATTHEW", False) is False:
return await ctx.respond("No.")
if not url.startswith("http"):
url = "http://" + url
url = urlparse(url)
if not url.scheme:
url = urlparse(url.geturl(), scheme="http")
friendly_url = textwrap.shorten(url.geturl(), 100)
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (0%)")