From d28f40c8a39e47946d396b67f09abab3f0d2511e Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 7 Feb 2021 22:18:45 +0800 Subject: =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E5=95=A5b=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/funny.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ATRI') diff --git a/ATRI/plugins/funny.py b/ATRI/plugins/funny.py index 9d31ef6..a31cfdf 100644 --- a/ATRI/plugins/funny.py +++ b/ATRI/plugins/funny.py @@ -41,7 +41,8 @@ me_to_you = on_message( @me_to_you.handle() async def _me_to_you(bot: Bot, event: MessageEvent) -> None: - rd = randint(0, 4) + rd = randint(0, 5) if rd == 1: - msg = str(event.get_message()) - await me_to_you.finish(msg.replace('我', '你')) + msg = str(event.message) + if "我" in msg: + await me_to_you.finish(msg.replace('我', '你')) -- cgit v1.2.3