mirror of https://github.com/Mai-with-u/MaiBot.git
Update src/plugins/chat/utils.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>pull/634/head
parent
6c448c0a73
commit
e9f89aeaf5
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue