Spaces:
Running
Running
Merge branch 'main' of https://github.com/Gojo-Bots/Gojo_Satarou
Browse files- Powers/plugins/pin.py +2 -6
Powers/plugins/pin.py
CHANGED
@@ -31,15 +31,11 @@ async def pin_message(_, m: Message):
|
|
31 |
if m.chat.username:
|
32 |
# If chat has a username, use this format
|
33 |
link_chat_id = m.chat.username
|
34 |
-
message_link =
|
35 |
-
f"https://t.me/{link_chat_id}/{m.reply_to_message.id}"
|
36 |
-
)
|
37 |
elif (str(m.chat.id)).startswith("-100"):
|
38 |
# If chat does not have a username, use this
|
39 |
link_chat_id = (str(m.chat.id)).replace("-100", "")
|
40 |
-
message_link =
|
41 |
-
f"https://t.me/c/{link_chat_id}/{m.reply_to_message.id}"
|
42 |
-
)
|
43 |
await m.reply_text(
|
44 |
text=f"I have Pinned [this message]({message_link})!",
|
45 |
disable_web_page_preview=True,
|
|
|
31 |
if m.chat.username:
|
32 |
# If chat has a username, use this format
|
33 |
link_chat_id = m.chat.username
|
34 |
+
message_link = f"https://t.me/{link_chat_id}/{m.reply_to_message.id}"
|
|
|
|
|
35 |
elif (str(m.chat.id)).startswith("-100"):
|
36 |
# If chat does not have a username, use this
|
37 |
link_chat_id = (str(m.chat.id)).replace("-100", "")
|
38 |
+
message_link = f"https://t.me/c/{link_chat_id}/{m.reply_to_message.id}"
|
|
|
|
|
39 |
await m.reply_text(
|
40 |
text=f"I have Pinned [this message]({message_link})!",
|
41 |
disable_web_page_preview=True,
|