diff options
author | Kyomotoi <[email protected]> | 2021-02-07 22:18:45 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-02-07 22:18:45 +0800 |
commit | d28f40c8a39e47946d396b67f09abab3f0d2511e (patch) | |
tree | ad2dc19d822e5e05e0cb9a6c6fc7daa6c277f0b2 | |
parent | 9d052eeb7d9d7b6ae50a4fb6e07a38cd492fd9c1 (diff) | |
download | ATRI-d28f40c8a39e47946d396b67f09abab3f0d2511e.tar.gz ATRI-d28f40c8a39e47946d396b67f09abab3f0d2511e.tar.bz2 ATRI-d28f40c8a39e47946d396b67f09abab3f0d2511e.zip |
🐛 修复啥b BUG
-rw-r--r-- | ATRI/plugins/funny.py | 7 |
1 files changed, 4 insertions, 3 deletions
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('我', '你')) |