mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-21 22:58:09 +00:00
⚡ Ignore forward_from_chat
This commit is contained in:
parent
43456033b8
commit
7f52a26074
@ -116,6 +116,13 @@ async def process_url(url: str, message: Message):
|
|||||||
async def twitter_share(_: Client, message: Message):
|
async def twitter_share(_: Client, message: Message):
|
||||||
if not message.text:
|
if not message.text:
|
||||||
return
|
return
|
||||||
|
if (
|
||||||
|
message.sender_chat
|
||||||
|
and message.forward_from_chat
|
||||||
|
and message.sender_chat.id == message.forward_from_chat.id
|
||||||
|
):
|
||||||
|
# 过滤绑定频道的转发
|
||||||
|
return
|
||||||
for num in range(len(message.entities)):
|
for num in range(len(message.entities)):
|
||||||
entity = message.entities[num]
|
entity = message.entities[num]
|
||||||
if entity.type == MessageEntityType.URL:
|
if entity.type == MessageEntityType.URL:
|
||||||
|
Loading…
Reference in New Issue
Block a user