mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Non-http links <333
This commit is contained in:
parent
f404bc7445
commit
1bb9b43a20
1 changed files with 3 additions and 4 deletions
|
@ -433,11 +433,10 @@ class OtherCog(commands.Cog):
|
||||||
if ctx.user.id == 1019233057519177778:
|
if ctx.user.id == 1019233057519177778:
|
||||||
if getattr(self.bot, "ALLOW_MATTHEW", False) is False:
|
if getattr(self.bot, "ALLOW_MATTHEW", False) is False:
|
||||||
return await ctx.respond("No.")
|
return await ctx.respond("No.")
|
||||||
|
|
||||||
if not url.startswith("http"):
|
|
||||||
url = "http://" + url
|
|
||||||
|
|
||||||
url = urlparse(url)
|
url = urlparse(url)
|
||||||
|
if not url.scheme:
|
||||||
|
url = urlparse(url.geturl(), scheme="http")
|
||||||
|
|
||||||
friendly_url = textwrap.shorten(url.geturl(), 100)
|
friendly_url = textwrap.shorten(url.geturl(), 100)
|
||||||
|
|
||||||
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (0%)")
|
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (0%)")
|
||||||
|
|
Loading…
Reference in a new issue