From cf7a64c934ad673d8dd49b0b1787c08fbdca3ce0 Mon Sep 17 00:00:00 2001 From: LambdaYH Date: Sun, 21 Aug 2022 22:24:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E7=AD=94=E4=B8=BA[at=20+=20?= =?UTF-8?q?=E6=96=87=E6=9C=AC]=E7=9A=84=E6=83=85=E5=86=B5=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/word_bank/word_handle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/word_bank/word_handle.py b/plugins/word_bank/word_handle.py index 5c6d7818..e35ac3dd 100644 --- a/plugins/word_bank/word_handle.py +++ b/plugins/word_bank/word_handle.py @@ -113,8 +113,9 @@ async def _( if seg.type == 'text' and '答' in str(seg): _problem = event.message[:index] answer = event.message[index:] - answer[0] = str(answer[0])[str(answer).index('答')+1:] - _problem[0] = str(_problem[0])[str(_problem).index('问')+1:] + answer[0] = str(answer[0])[str(answer[0]).index('答')+1:] + _problem[0] = str(_problem[0])[str(_problem[0]).index('问')+1:] + _problem.append(seg.data['text'][:seg.data['text'].index('答')]) temp = '' for g in _problem: if isinstance(g, str):