diff --git a/src/plugins/chat/utils.py b/src/plugins/chat/utils.py index f68519d3..08116d73 100644 --- a/src/plugins/chat/utils.py +++ b/src/plugins/chat/utils.py @@ -362,7 +362,7 @@ def calculate_typing_time(input_string: str, chinese_time: float = 0.2, english_ """ # 回复、发送图片/表情包操作短暂计时 total_time = 0.0 - pattern = re.compile(r'\[[回复 ,表情包:,图片:][\s\S]*?\]') + pattern = re.compile(r'\[(回复|表情包:|图片:)[\s\S]*?\]') if re.match(pattern, input_string): input_string = re.sub(pattern, '', input_string) total_time += random.randrange(1, 3)