fix: only repeat the message when it appears continuously
This commit is contained in:
parent
359f3aee88
commit
540b50c4d8
2 changed files with 16 additions and 11 deletions
|
@ -53,7 +53,7 @@ class TelegramAdapter:
|
|||
# link 模块
|
||||
router.message(F.text.regexp(r'https?:\/\/(?:www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b)*(\/[\/\d\w\.-]*)*(?:[\?])*(.+)*'))(handle_links)
|
||||
# repeater 模块
|
||||
router.message(F.text & (F.chat.type.in_({'group', 'supergroup'})))(MessageRepeater().handle_message)
|
||||
router.message(F.chat.type.in_({'group', 'supergroup'}))(MessageRepeater().handle_message)
|
||||
|
||||
# 捕获所有其他消息
|
||||
router.message(F.chat.type.in_({'group', 'supergroup'}))(dummy_handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue