mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-27 02:23:50 +00:00
chore: update bsky domain
This commit is contained in:
parent
e729d6e93d
commit
966acd108e
@ -59,7 +59,9 @@ class Timeline:
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_media_group(text: str, post: HumanPost, has_spoiler: bool) -> list[InputMediaPhoto]:
|
def get_media_group(
|
||||||
|
text: str, post: HumanPost, has_spoiler: bool
|
||||||
|
) -> list[InputMediaPhoto]:
|
||||||
data = []
|
data = []
|
||||||
images = post.images
|
images = post.images
|
||||||
for idx, image in enumerate(images):
|
for idx, image in enumerate(images):
|
||||||
|
@ -18,7 +18,7 @@ class Reply(BaseModel):
|
|||||||
|
|
||||||
async def process_url(url: str, reply: Reply, override_hidden: bool):
|
async def process_url(url: str, reply: Reply, override_hidden: bool):
|
||||||
url = urlparse(url)
|
url = urlparse(url)
|
||||||
if url.hostname and url.hostname in ["bsky.app"]:
|
if url.hostname and url.hostname in ["bsky.app", "bsky.xtaolabs.com"]:
|
||||||
if url.path.find("profile") < 0:
|
if url.path.find("profile") < 0:
|
||||||
return
|
return
|
||||||
author_handle = str(url.path[url.path.find("profile") + 8 :].split("/")[0])
|
author_handle = str(url.path[url.path.find("profile") + 8 :].split("/")[0])
|
||||||
@ -40,7 +40,7 @@ async def process_url(url: str, reply: Reply, override_hidden: bool):
|
|||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
|
|
||||||
@bot.on_message(filters.incoming & filters.text & filters.regex(r"bsky.app/"))
|
@bot.on_message(filters.incoming & filters.text & filters.regex(r"bsky.*?\/profile\/"))
|
||||||
async def bsky_share(_: Client, message: Message):
|
async def bsky_share(_: Client, message: Message):
|
||||||
text = message.text
|
text = message.text
|
||||||
if not text:
|
if not text:
|
||||||
|
Loading…
Reference in New Issue
Block a user