2020-08-11 17:57:57 +00:00
|
|
|
|
""" Pagermaid hyperlink plugin. by @OahiewUoil """
|
|
|
|
|
|
2022-01-18 08:47:20 +00:00
|
|
|
|
from pagermaid import version
|
2020-08-11 17:57:57 +00:00
|
|
|
|
from pagermaid.listener import listener
|
2021-06-16 07:09:40 +00:00
|
|
|
|
from pagermaid.utils import alias_command
|
2020-08-11 17:57:57 +00:00
|
|
|
|
|
2021-06-16 07:09:40 +00:00
|
|
|
|
|
|
|
|
|
@listener(is_plugin=True, outgoing=True, command=alias_command("hl"),
|
2020-08-11 17:57:57 +00:00
|
|
|
|
description="生成隐藏链接。非链接的纯文字将直接隐藏。",
|
|
|
|
|
parameters="<link>")
|
|
|
|
|
async def hyperlink(context):
|
|
|
|
|
await context.edit(f"正在生成 . . .")
|
|
|
|
|
if context.arguments:
|
|
|
|
|
link = context.arguments
|
2021-06-16 07:09:40 +00:00
|
|
|
|
else:
|
|
|
|
|
link = ''
|
2020-08-11 17:57:57 +00:00
|
|
|
|
await context.edit(f"[ㅤㅤㅤㅤㅤㅤㅤ]({link})", link_preview=False)
|