回复、发送图片/表情包操作不计时

pull/634/head
Bakadax 2025-04-02 11:03:01 +08:00
parent 4b3287dfca
commit adc94900d8
1 changed files with 4 additions and 0 deletions

View File

@ -360,6 +360,10 @@ def calculate_typing_time(input_string: str, chinese_time: float = 0.2, english_
- 如果只有一个中文字符将使用3倍的中文输入时间
- 在所有输入结束后额外加上回车时间0.3
"""
# 回复、发送图片/表情包操作不计时
pattern = re.compile(r'\[[回复 ,表情包:,图片:][\s\S]*?\]')
input_string = re.sub(pattern, '', input_string)
mood_manager = MoodManager.get_instance()
# 将0-1的唤醒度映射到-1到1
mood_arousal = mood_manager.current_mood.arousal